摘要: http://localhost:9000/source/hello/dd 阅读全文
posted @ 2018-03-12 23:02 zfzf1 阅读(116) 评论(0) 推荐(0) 编辑
摘要: http://localhost:8082/hystrix http://localhost:8081/hystrix.stream 阅读全文
posted @ 2018-03-12 22:48 zfzf1 阅读(242) 评论(0) 推荐(0) 编辑
摘要: server: port: 8081 spring: application: name: spring-hy-sale feign: hystrix: enabled: true hystrix: command: HelloClient#toHello(): execution: isolation: t... 阅读全文
posted @ 2018-03-12 22:41 zfzf1 阅读(470) 评论(0) 推荐(0) 编辑
摘要: @Service public class CollService { @HystrixCollapser(batchMethod = "getMembers", collapserProperties = { //收集1秒内的请求 @HystrixProperty(name = "timerDelayInMilliseconds", value = "1000") }) p... 阅读全文
posted @ 2018-03-12 21:12 zfzf1 阅读(528) 评论(1) 推荐(0) 编辑
摘要: @SpringBootApplication @EnableEurekaClient @EnableCircuitBreaker @ServletComponentScan public class SaleApp { @Bean @LoadBalanced public RestTemplate getRestTemplate() { return new RestTemplat... 阅读全文
posted @ 2018-03-12 17:58 zfzf1 阅读(1347) 评论(0) 推荐(0) 编辑
摘要: @WebFilter(urlPatterns = "/*", filterName = "hystrixFilter") public class MyFilter implements Filter { public void init(FilterConfig filterConfig) throws ServletException { } public void doFi... 阅读全文
posted @ 2018-03-12 17:56 zfzf1 阅读(128) 评论(0) 推荐(0) 编辑
摘要: @Service public class CacheService { @Autowired private RestTemplate restTpl; @CacheResult @HystrixCommand public Member cacheMember(Integer id) { System.out.println("调用 cacheMember 方法"); /... 阅读全文
posted @ 2018-03-12 17:54 zfzf1 阅读(327) 评论(0) 推荐(0) 编辑
摘要: org.springframework.cloud spring-cloud-dependencies Dalston.SR3 pom import org.springframework.cloud spring-cloud-starter-config org.springfra... 阅读全文
posted @ 2018-03-12 17:32 zfzf1 阅读(160) 评论(0) 推荐(0) 编辑