异常摘要:org.springframework.amqp.AmqpConnectException:java.net.ConnectException:连接被拒绝

时间:2015-11-25 08:33:11

标签: spring spring-cloud

使用gradle构建spring cloud总线客户端,build.gradle如下:

server.crt

当我使用spring-cloud-bus时,我遇到了问题:

apply plugin: "spring-boot"

    ext {
      springCloudConfigVersion = "1.0.2.RELEASE"
      springCloudStarterVersion = "1.0.2.RELEASE"
    }

    dependencyManagement {
      imports {
        mavenBom "org.springframework.cloud:spring-cloud-config:${springCloudConfigVersion}"
        mavenBom "org.springframework.cloud:spring-cloud-starter-parent:${springCloudStarterVersion}"
      }
    }

    dependencies {
      compile(project(":video-service:video-service-api"))
      compile("org.springframework.boot:spring-boot-starter-data-mongodb")
      compile("org.springframework.boot:spring-boot-starter-web")
      compile("org.springframework.boot:spring-boot-starter-actuator")
      compile("org.springframework.cloud:spring-cloud-starter")
      compile("org.springframework.cloud:spring-cloud-starter-eureka")
      compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
      testCompile("org.springframework.boot:spring-boot-starter-test")
    }

config server application.yml:

o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused

http://localhost:15672/#/

spring:
  data:
    mongodb:
      uri: ${MONGODB_URL:mongodb://localhost:27017/stores}
  rabbitmq:
    addresses: ${RABBITMQ_URL:amqp://guest:guest@localhost:5672}
    virtual-host: /

出了什么问题,请帮助我。

0 个答案:

没有答案