我们使用 Cloud Foundry 配置了 rabbitMQ 服务,它看起来像这样:“amqp+ssl”:{“host”:xxx,“password”:xxxx“port”:5671,“ssl”:true,“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);
}
如果有人有一个小代码片段如何正确使用spring cloud,那就太好了。我注意到 spring-cloud-connectors 的存在,但是没有示例如何使用它......只有如何使用和创建自定义服务连接器!?
感谢您的帮助和时间。
弗拉基米尔