1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

SentinelProtect rename to SentinelRestTemplate

This commit is contained in:
fangjian0423
2018-12-06 16:45:47 +08:00
parent e812515250
commit fb9e0f51f4
5 changed files with 227 additions and 219 deletions

View File

@@ -2,7 +2,7 @@ package org.springframework.cloud.alibaba.cloud.examples;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.alibaba.sentinel.annotation.SentinelProtect;
import org.springframework.cloud.alibaba.sentinel.annotation.SentinelRestTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@@ -15,7 +15,7 @@ import com.alibaba.csp.sentinel.datasource.Converter;
public class ServiceApplication {
@Bean
@SentinelProtect(blockHandler = "handleException", blockHandlerClass = ExceptionUtil.class)
@SentinelRestTemplate(blockHandler = "handleException", blockHandlerClass = ExceptionUtil.class)
public RestTemplate restTemplate() {
return new RestTemplate();
}