mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
add switch for @SentinelRestTemplate
This commit is contained in:
parent
ca5d5282a5
commit
a59011fa93
@ -166,6 +166,7 @@ public class SentinelAutoConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
|
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
|
||||||
|
@ConditionalOnProperty(name = "resttemplate.sentinel.enabled", havingValue = "true", matchIfMissing = true)
|
||||||
public SentinelBeanPostProcessor sentinelBeanPostProcessor(
|
public SentinelBeanPostProcessor sentinelBeanPostProcessor(
|
||||||
ApplicationContext applicationContext) {
|
ApplicationContext applicationContext) {
|
||||||
return new SentinelBeanPostProcessor(applicationContext);
|
return new SentinelBeanPostProcessor(applicationContext);
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
"defaultValue": true,
|
"defaultValue": true,
|
||||||
"description": "enable or disable sentinel auto configure."
|
"description": "enable or disable sentinel auto configure."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "resttemplate.sentinel.enabled",
|
||||||
|
"type": "java.lang.Boolean",
|
||||||
|
"defaultValue": true,
|
||||||
|
"description": "enable or disable @SentinelRestTemplate."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spring.cloud.sentinel.eager",
|
"name": "spring.cloud.sentinel.eager",
|
||||||
"type": "java.lang.Boolean",
|
"type": "java.lang.Boolean",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user