博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Spring Cloud学习笔记【十】配置中心(消息驱动刷新配置)
阅读量:5337 次
发布时间:2019-06-15

本文共 25737 字,大约阅读时间需要 85 分钟。

中讲到,如果需要客户端获取到最新的配置信息需要执行refresh,我们可以利用 Webhook 的机制每次提交代码发送请求来刷新客户端,当客户端越来越多的时候,需要每个客户端都执行一遍,这种方案就不太适合了。使用 Spring Cloud Bus 可以完美解决这一问题。

服务端

新建一个spring boot项目,命名 service-config-server-bus

POM 配置

1 
2
org.springframework.boot
3
spring-boot-starter-amqp
4
5
6
org.springframework.cloud
7
spring-cloud-bus
8
9
10
org.springframework.cloud
11
spring-cloud-config-server
12
13
14
org.springframework.cloud
15
spring-cloud-starter-netflix-eureka-client
16
17
18
org.springframework.cloud
19
spring-cloud-stream-binder-rabbit
20

配置文件

application.yml 内容如下

server:  port: 9300spring:  application:    name: service-config-server-bus  cloud:    config:      server:        git:          uri: https://github.com/carry-chan/spring-cloud # 配置git仓库的地址          search-paths: config-repo # git仓库地址下的相对地址,可以配置多个,用,分割。    bus:      enabled: true      trace:        enabled: true  rabbitmq:    addresses: 192.168.68.100    port: 5672     username: test    password: 123456eureka:  client:    serviceUrl:      defaultZone: http://admin:123456@localhost:8761/eureka/management:  endpoints:    web:      exposure:        include: bus-refresh

启动类

1 package com.carry.springcloud; 2  3 import org.springframework.boot.SpringApplication; 4 import org.springframework.boot.autoconfigure.SpringBootApplication; 5 import org.springframework.cloud.config.server.EnableConfigServer; 6  7 @SpringBootApplication 8 @EnableConfigServer 9 public class ServiceConfigClientBusApplication {10 11     public static void main(String[] args) {12         SpringApplication.run(ServiceConfigClientBusApplication.class, args);13     }14 }

客户端

新建spring boot项目 service-config-client-bus

POM 配置

1 
2
org.springframework.boot
3
spring-boot-starter-actuator
4
5
6
org.springframework.boot
7
spring-boot-starter-amqp
8
9
10
org.springframework.boot
11
spring-boot-starter-webflux
12
13
14
org.springframework.cloud
15
spring-cloud-bus
16
17
18
org.springframework.cloud
19
spring-cloud-starter-config
20
21
22
org.springframework.cloud
23
spring-cloud-starter-netflix-eureka-client
24
25
26
org.springframework.cloud
27
spring-cloud-stream-binder-rabbit
28

配置文件

application.yml

server:  port: 9401spring:  application:    name: service-config-client  cloud:    bus:      enabled: true      trace:        enabled: true  rabbitmq:    addresses: 192.168.68.100    port: 5672    username: test    password: 123456

bootstrap.yml

spring:  cloud:    config:      name: config-server # 对应 {application} 部分      profile: dev # 对应 {profile} 部分      label: master # 对应 {label} 部分,即 Git 的分支。如果配置中心使用的是本地存储,则该参数无用      discovery:        enabled: true        service-id: service-config-server-bus #springcloud config的服务名eureka:  client:    serviceUrl:      defaultZone: http://admin:123456@localhost:8761/eureka/

控制层Controller

1 package com.carry.springcloud; 2  3 import org.springframework.beans.factory.annotation.Value; 4 import org.springframework.cloud.context.config.annotation.RefreshScope; 5 import org.springframework.web.bind.annotation.GetMapping; 6 import org.springframework.web.bind.annotation.RestController; 7  8 import reactor.core.publisher.Mono; 9 10 @RestController11 @RefreshScope12 public class ClientController {13 14     @Value("${info.profile}")15     private String profile;16 17     @GetMapping("/info")18     public Mono
hello() {19 return Mono.justOrEmpty(profile);20 }21 }

@RefreshScope必须加,否则客户端会受到服务端的更新消息,但是更新不了,因为不知道更新哪里的,至于启动主类,用默认生成的不用改。

测试

分别启动 eureka-server、service-config-server-bus 和两个 service-config-client-bus

启动后,RabbitMQ 中会自动创建一个 topic 类型的 Exchange 和两个以springCloudBus.anonymous.开头的匿名 Queue

我们用Postman发生请求  和  返回内容的都是dev

 

将 Git 中的配置信息由dev改为dev bus,并执行POST   之后,再请求  和  ,返回dev bus 说明成功了。

服务端在刷新接口产生的的日志:

2018-08-31 16:50:43.182  INFO 18112 --- [nio-9300-exec-9] o.s.a.r.c.CachingConnectionFactory       : Attempting to connect to: [192.168.68.100:5672]2018-08-31 16:50:43.211  INFO 18112 --- [nio-9300-exec-9] o.s.a.r.c.CachingConnectionFactory       : Created new connection: rabbitConnectionFactory.publisher#1322bcdc:0/SimpleConnection@1799d006 [delegate=amqp://test@192.168.68.100:5672/, localPort= 52394]2018-08-31 16:50:43.225  INFO 18112 --- [nio-9300-exec-9] o.s.amqp.rabbit.core.RabbitAdmin         : Auto-declaring a non-durable, auto-delete, or exclusive Queue (springCloudBus.anonymous.91dZPs4ITESmKzjJHBhVoA) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.2018-08-31 16:50:44.299  INFO 18112 --- [nio-9300-exec-9] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:44.374  INFO 18112 --- [nio-9300-exec-9] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1c63e07d: startup date [Fri Aug 31 16:50:44 CST 2018]; root of context hierarchy2018-08-31 16:50:44.399  INFO 18112 --- [nio-9300-exec-9] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:44.416  INFO 18112 --- [nio-9300-exec-9] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$a801f44] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)2018-08-31 16:50:45.541  INFO 18112 --- [nio-9300-exec-9] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:45.565  INFO 18112 --- [nio-9300-exec-9] o.s.boot.SpringApplication               : No active profile set, falling back to default profiles: default2018-08-31 16:50:45.567  INFO 18112 --- [nio-9300-exec-9] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1539f21d: startup date [Fri Aug 31 16:50:45 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1c63e07d2018-08-31 16:50:45.569  INFO 18112 --- [nio-9300-exec-9] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:45.578  INFO 18112 --- [nio-9300-exec-9] o.s.boot.SpringApplication               : Started application in 2.337 seconds (JVM running for 2768.887)2018-08-31 16:50:45.578  INFO 18112 --- [nio-9300-exec-9] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1539f21d: startup date [Fri Aug 31 16:50:45 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1c63e07d2018-08-31 16:50:45.579  INFO 18112 --- [nio-9300-exec-9] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1c63e07d: startup date [Fri Aug 31 16:50:44 CST 2018]; root of context hierarchy2018-08-31 16:50:45.707  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...2018-08-31 16:50:45.709  INFO 18112 --- [nio-9300-exec-9] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING2018-08-31 16:50:48.673  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Unregistering ...2018-08-31 16:50:48.693  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-SERVER-BUS/localhost:service-config-server-bus:9300 - deregister  status: 2002018-08-31 16:50:48.727  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient2018-08-31 16:50:48.736  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-12018-08-31 16:50:48.741  INFO 18112 --- [nio-9300-exec-9] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson2018-08-31 16:50:48.741  INFO 18112 --- [nio-9300-exec-9] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson2018-08-31 16:50:48.741  INFO 18112 --- [nio-9300-exec-9] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml2018-08-31 16:50:48.741  INFO 18112 --- [nio-9300-exec-9] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml2018-08-31 16:50:48.865  INFO 18112 --- [nio-9300-exec-9] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration2018-08-31 16:50:48.865  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Disable delta property : false2018-08-31 16:50:48.865  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null2018-08-31 16:50:48.866  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false2018-08-31 16:50:48.866  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Application is null : false2018-08-31 16:50:48.866  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true2018-08-31 16:50:48.866  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Application version is -1: true2018-08-31 16:50:48.866  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server2018-08-31 16:50:48.870  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : The response status is 2002018-08-31 16:50:48.871  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 302018-08-31 16:50:48.873  INFO 18112 --- [nio-9300-exec-9] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 42018-08-31 16:50:48.874  INFO 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1535705448874 with initial instances count: 32018-08-31 16:50:48.877  INFO 18112 --- [nio-9300-exec-9] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application service-config-server-bus with eureka with status DOWN2018-08-31 16:50:48.877  INFO 18112 --- [nio-9300-exec-9] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application service-config-server-bus with eureka with status UP2018-08-31 16:50:48.877  WARN 18112 --- [nio-9300-exec-9] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1535705448877, current=UP, previous=DOWN]2018-08-31 16:50:48.878  INFO 18112 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-SERVER-BUS/localhost:service-config-server-bus:9300: registering service...2018-08-31 16:50:48.880  INFO 18112 --- [nio-9300-exec-9] o.s.cloud.bus.event.RefreshListener      : Received remote refresh request. Keys refreshed []2018-08-31 16:50:48.886  INFO 18112 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-SERVER-BUS/localhost:service-config-server-bus:9300 - registration status: 2042018-08-31 16:50:49.161  INFO 18112 --- [io-9300-exec-10] .c.s.e.MultipleJGitEnvironmentRepository : Fetched for remote master and found 1 updates2018-08-31 16:50:50.235  INFO 18112 --- [io-9300-exec-10] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:50.291  INFO 18112 --- [io-9300-exec-10] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a199145: startup date [Fri Aug 31 16:50:50 CST 2018]; root of context hierarchy2018-08-31 16:50:50.293  INFO 18112 --- [io-9300-exec-10] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:50.298  INFO 18112 --- [io-9300-exec-10] o.s.c.c.s.e.NativeEnvironmentRepository  : Adding property source: file:/C:/Users/ADMINI~1/AppData/Local/Temp/config-repo-4017042254956212660/config-repo/config-server-dev.yml2018-08-31 16:50:50.298  INFO 18112 --- [io-9300-exec-10] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a199145: startup date [Fri Aug 31 16:50:50 CST 2018]; root of context hierarchy2018-08-31 16:50:52.554  INFO 18112 --- [nio-9300-exec-1] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:52.605  INFO 18112 --- [nio-9300-exec-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2013736a: startup date [Fri Aug 31 16:50:52 CST 2018]; root of context hierarchy2018-08-31 16:50:52.611  INFO 18112 --- [nio-9300-exec-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:52.616  INFO 18112 --- [nio-9300-exec-1] o.s.c.c.s.e.NativeEnvironmentRepository  : Adding property source: file:/C:/Users/ADMINI~1/AppData/Local/Temp/config-repo-4017042254956212660/config-repo/config-server-dev.yml2018-08-31 16:50:52.616  INFO 18112 --- [nio-9300-exec-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2013736a: startup date [Fri Aug 31 16:50:52 CST 2018]; root of context hierarchy

客户端在刷新接口产生的的日志:

2018-08-31 16:50:28.853  INFO 9324 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration2018-08-31 16:50:44.332  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:44.379  INFO 9324 --- [9uOLZV0TWJm8g-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6f60de07: startup date [Fri Aug 31 16:50:44 CST 2018]; root of context hierarchy2018-08-31 16:50:44.439  INFO 9324 --- [9uOLZV0TWJm8g-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:44.464  INFO 9324 --- [9uOLZV0TWJm8g-1] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$8ecaf823] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)2018-08-31 16:50:45.555  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:45.572  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING2018-08-31 16:50:45.584  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-12018-08-31 16:50:45.590  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson2018-08-31 16:50:45.590  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson2018-08-31 16:50:45.590  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml2018-08-31 16:50:45.590  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml2018-08-31 16:50:45.719  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Disable delta property : false2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Application is null : false2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Application version is -1: true2018-08-31 16:50:45.720  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server2018-08-31 16:50:45.724  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : The response status is 2002018-08-31 16:50:45.725  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Not registering with Eureka server per configuration2018-08-31 16:50:45.726  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1535705445726 with initial instances count: 32018-08-31 16:50:46.804  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname2018-08-31 16:50:46.833  INFO 9324 --- [9uOLZV0TWJm8g-1] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:9300/2018-08-31 16:50:52.619  INFO 9324 --- [9uOLZV0TWJm8g-1] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config-server, profiles=[dev], label=master, version=34046e96c2c637976b412e1af36e2dc87d713849, state=null2018-08-31 16:50:52.619  INFO 9324 --- [9uOLZV0TWJm8g-1] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='configClient'}, MapPropertySource {name='https://github.com/carry-chan/spring-cloud/config-repo/config-server-dev.yml'}]}2018-08-31 16:50:52.621  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.boot.SpringApplication               : No active profile set, falling back to default profiles: default2018-08-31 16:50:52.624  INFO 9324 --- [9uOLZV0TWJm8g-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7205494f: startup date [Fri Aug 31 16:50:52 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f60de072018-08-31 16:50:52.635  INFO 9324 --- [9uOLZV0TWJm8g-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring2018-08-31 16:50:52.664  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.boot.SpringApplication               : Started application in 9.372 seconds (JVM running for 2744.746)2018-08-31 16:50:52.665  INFO 9324 --- [9uOLZV0TWJm8g-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7205494f: startup date [Fri Aug 31 16:50:52 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f60de072018-08-31 16:50:52.665  INFO 9324 --- [9uOLZV0TWJm8g-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@6f60de07: startup date [Fri Aug 31 16:50:44 CST 2018]; root of context hierarchy2018-08-31 16:50:52.666  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...2018-08-31 16:50:52.671  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient2018-08-31 16:50:52.778  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...2018-08-31 16:50:52.785  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING2018-08-31 16:50:55.789  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Unregistering ...2018-08-31 16:50:55.800  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-CLIENT/localhost:service-config-client:9400 - deregister  status: 2002018-08-31 16:50:55.844  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient2018-08-31 16:50:55.848  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-12018-08-31 16:50:55.851  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson2018-08-31 16:50:55.851  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson2018-08-31 16:50:55.851  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml2018-08-31 16:50:55.851  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml2018-08-31 16:50:55.955  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Disable delta property : false2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Application is null : false2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Application version is -1: true2018-08-31 16:50:55.956  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server2018-08-31 16:50:55.959  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : The response status is 2002018-08-31 16:50:55.960  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 302018-08-31 16:50:55.962  INFO 9324 --- [9uOLZV0TWJm8g-1] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 42018-08-31 16:50:55.963  INFO 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1535705455963 with initial instances count: 32018-08-31 16:50:55.966  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application service-config-client with eureka with status DOWN2018-08-31 16:50:55.967  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application service-config-client with eureka with status UP2018-08-31 16:50:55.967  WARN 9324 --- [9uOLZV0TWJm8g-1] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1535705455967, current=UP, previous=DOWN]2018-08-31 16:50:55.967  INFO 9324 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-CLIENT/localhost:service-config-client:9400: registering service...2018-08-31 16:50:55.969  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.cloud.bus.event.RefreshListener      : Received remote refresh request. Keys refreshed [config.client.version, server.port, info.profile]2018-08-31 16:50:55.973  INFO 9324 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-CONFIG-CLIENT/localhost:service-config-client:9400 - registration status: 2042018-08-31 16:50:55.980  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.a.r.c.CachingConnectionFactory       : Attempting to connect to: [192.168.68.100:5672]2018-08-31 16:50:56.011  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.a.r.c.CachingConnectionFactory       : Created new connection: rabbitConnectionFactory.publisher#1ce5511d:0/SimpleConnection@b4fc1ee [delegate=amqp://test@192.168.68.100:5672/, localPort= 52407]2018-08-31 16:50:56.015  INFO 9324 --- [9uOLZV0TWJm8g-1] o.s.amqp.rabbit.core.RabbitAdmin         : Auto-declaring a non-durable, auto-delete, or exclusive Queue (springCloudBus.anonymous.pFKC8gHGT9uOLZV0TWJm8g) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.

 

转载于:https://www.cnblogs.com/carrychan/p/9566747.html

你可能感兴趣的文章
母版页中引用图片,外部js、css文件的路径问题 [转]
查看>>
微信小程序_(组件)组件基础
查看>>
原生Js_制作简易日历
查看>>
2015年10月14日学习笔记
查看>>
hdu 1026 Ignatius and the Princess I
查看>>
数据结构考研模糊知识点2.1
查看>>
【每日算法】交换排序算法之冒泡排序
查看>>
Java-NIO(四):通道(Channel)的原理与获取
查看>>
pandas 的算术运算和数据对齐
查看>>
R语言-增加图例
查看>>
linux 建立桌面快捷方式,让所有用户都能在桌面直接打开某软件
查看>>
CF1039E Summer Oenothera Exhibition 根号分治,LCT,ST表
查看>>
Linux安装JDK
查看>>
iptables原理详解(一)
查看>>
mySQL遇到的问题
查看>>
线性判别分析(线性回归、对数几率回归、线性判别分析和广义线性判别分析)...
查看>>
集群架构基础必会
查看>>
实现TCP连接的AT指令
查看>>
jquery 备忘笔记
查看>>
Ubuntu下安装eclipse
查看>>