摘要:
@Service public class CollService { @HystrixCollapser(batchMethod = "getMembers", collapserProperties = { //收集1秒内的请求 @HystrixProperty(name = "timerDelayInMilliseconds", value = "1000") }) p... 阅读全文
posted @ 2018-03-12 21:12
zfzf1
阅读(534)
评论(1)
推荐(0)
摘要:
@SpringBootApplication @EnableEurekaClient @EnableCircuitBreaker @ServletComponentScan public class SaleApp { @Bean @LoadBalanced public RestTemplate getRestTemplate() { return new RestTemplat... 阅读全文
posted @ 2018-03-12 17:58
zfzf1
阅读(1352)
评论(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
阅读(140)
评论(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
阅读(332)
评论(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
阅读(167)
评论(0)
推荐(0)

浙公网安备 33010602011771号