Open 8battery opened 4 years ago
@8battery for Connection timed out, on client side, you have to config the sentinel degrade rule, for example
DegradeRule degradeRule = new DegradeRule();
degradeRule.setResource("POST:http://localhost:8080/hello/normal");
degradeRule.setLimitApp("default");
degradeRule.setGrade(RuleConstant.DEGRADE_GRADE_EXCEPTION_COUNT);
degradeRule.setCount(3);
degradeRule.setTimeWindow(30);
我在本地测试也是一样的问题,我的环境是
`
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
<version>2.2.3.RELEASE</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-datasource-apollo</artifactId>
<version>1.8.0</version>
</dependency>`
我的配置是拉的Apollo里的配置:
{ "resource": "GET:http://localhost:800/hello2", "count": 500.0, "grade": 0, "timeWindow": 10, "minRequestAmount": 3, "statIntervalMs": 3000, "slowRatioThreshold": 0.6 }
也是NPE
cc @yuhuangbin
Issue Description
@SentinelRestTemplate 注解未生效
请求的地址服务端关闭后,测试请求抛异常退出了,并没有走熔断处理 抛出异常
如果去掉@SentinelRestTemplate,抛出 Connection timed out异常
Describe what happened (or what feature you want)
Tell us your environment
jdk1.8 spring boot 2.1.6.RELEASE spring web 5.1.8.RELEASE sentinel 2.1.0.RELEASE