implementation 'com.netflix.hystrix:hystrix-javanica'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-netflix-hystrix-dashboard'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
//@EnableTurbine 集群监控
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-netflix-turbine
implementation 'org.springframework.cloud:spring-cloud-netflix-turbine'
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-turbine
// implementation 'org.springframework.cloud:spring-cloud-starter-turbine'
//配置中心
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-config-client'
//监控配置中心
//是一套监控的功能,可以监控程序在运行时状态,其中就包括/refresh的功能。
implementation 'org.springframework.boot:spring-boot-starter-actuator'
//对消息总线的支持
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-bus-amqp
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
#对应{application}部分
spring.cloud.config.name=neo-config
#对应{profile}部分
spring.cloud.config.profile=dev
#对应git的分支
spring.cloud.config.label=master
#配置中心的具体地址
spring.cloud.config.enabled=true
#spring.cloud.config.uri=http://localhost:8003/
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=ads-config-server
eureka.client.serviceUrl.defaultZone=http://4.1.22.22:8200/eureka/
#开启刷新配置 server也要加配置
management.endpoints.web.exposure.include=*
#特别注意:上面这些与spring-cloud相关的属性必须配置在bootstrap.properties中,
# config部分内容才能被正确加载。因为config的相关配置会先于application.properties,
# 而bootstrap.properties的加载也是先于application.properties。
spring.application.name=ads-demo-consumer
server.port=8302
eureka.client.serviceUrl.defaultZone=http://4.1.22.22:8200/eureka/
#开启熔断
feign.hystrix.enabled=true
#开启端口
management.endpoints.web.exposure.include=*
#跟踪总线事件 /trace
spring.cloud.bus.trace.enabled=true
spring.rabbitmq.host=88.8.66.88
spring.rabbitmq.port=5672
spring.rabbitmq.username=eet
spring.rabbitmq.password=971024
全部刷新
curl -v -X POST "http://localhost:8302/actuator/bus-refresh"
局部刷新
curl -v -X POST “http://localhost:8302/actuator/refresh”