SpringCloud-熔斷器Hystrix(二)

動手實踐 1 )引入依賴 在 consumer - demo 消費端系統的 pom.xml 文件添加如下依賴: 2 )開啓熔斷 在啓動類 ConsumerApplication 上添加註解: @EnableCircuitBreaker 可以看到,我們類上的註解越來越多,在微服務中,經常會引入上面的三個註解,於是 Spring 就提供了一個組合注 解: @SpringCloudApplication
相關文章
相關標籤/搜索