SpringCloud Bus 消息总线动态更新配置中心属性详解

一、基本概念

消息总线在微服务架构系统中被广泛使用, 所以它同配置中心一样, 几乎是微服
务架构中的必备组件。 Spring Cloud 作为微服务架构综合性的解决方案,对此自然也有自己
的实现, 这就是本章我们将要具体介绍的 Spring Cloud Bus。 通过使用 Spring Cloud Bus,
可以非常容易地搭建起消息总线, 同时实现了 一些消息总线中的常用功能, 比如, 配合
Spring Cloud Confg 实现微服务应用配置信息的动态更新等。

二、详细配置

springCloud_eureka  服务端 8080

springCloud_eureka2 客户端 8081

springCloud_eureka3 服务端 8082

客户端添加 pom.xml

		<!-- RabbitMQ消息总线 -->
		<dependency>
		     <groupId>org.springframework.cloud</groupId>
		     <artifactId>spring-cloud-starter-bus-amqp</artifactId>
		 </dependency> 
		<!-- 监控包 -->
 		<dependency>
                    <groupId>org.springframework.boot</groupId>
 

猜你喜欢

转载自blog.csdn.net/qq_17025903/article/details/100125583