【发布时间】:2015-03-13 11:05:08
【问题描述】:
我们使用 Cloud Foundry 提供了一个 rabbitMQ 服务,它看起来像这样: “amqp+ssl”:{ “主机”:xxx, “密码”:xxxx “端口”:5671, “ssl”:是的, "uri": "amqps:/......
当我推送我的应用时出现错误:amqp URI 中的方案错误...
有人知道如何更改方案,因为我需要 amqps?
现在我有这个:
@Configuration
@ServiceScan
@Profile("cloud")
public class CloudConfig extends AbstractCloudConfig {
@Bean
public ApplicationInstanceInfo applicationInfo() {
return cloud().getApplicationInstanceInfo();
}
@Bean
public ConnectionFactory rabbitConnectionFactory(){
// I would say here I have to configure the amqp connectionFactory??
// But how? :(
return connectionFactory;
}
@Bean
public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory){
return new RabbitTemplate(connectionFactory);
}
如果有人有一个小代码sn-p如何正确使用spring cloud,那就太好了。我已经注意到 spring-cloud-connectors 的存在,但是没有示例如何使用它......只有如何使用和创建自定义服务连接器!?
感谢您的帮助和时间。
弗拉基米尔
【问题讨论】:
标签: spring-cloud