十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
前提是你已经有了注册中心,然后搭建一个基础spring cloud 服务,并配置注册服务等等前提环境搭建
接下来描述的服务提供者和服务调用者的配置都是一样的,来自《spring cloud 与 docker微服务架构实战》的读后的个人总结.
pom文件中需要引入spring-cloud-starter-hystrix/spring-cloud-starter-hystrix-dashboard/spring-cloud-netflix-hystrix-stream/spring-cloud-starter-turbine-stream/spring-cloud-starter-stream-rabbit
如下
org.springframework.cloud spring-cloud-starter-hystrix org.springframework.cloud spring-cloud-starter-hystrix-dashboard org.springframework.cloud spring-cloud-netflix-hystrix-stream org.springframework.cloud spring-cloud-starter-turbine-stream org.springframework.cloud spring-cloud-starter-stream-rabbit