前提是你已經(jīng)有了注冊中心,然后搭建一個基礎(chǔ)spring cloud 服務(wù),并配置注冊服務(wù)等等前提環(huán)境搭建
接下來描述的服務(wù)提供者和服務(wù)調(diào)用者的配置都是一樣的,來自《spring cloud 與 docker微服務(wù)架構(gòu)實(shí)戰(zhàn)》的讀后的個人總結(jié).
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