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
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
|
||||
@ConditionalOnProperty(name = "resttemplate.sentinel.enabled", havingValue = "true", matchIfMissing = true)
|
||||
public SentinelBeanPostProcessor sentinelBeanPostProcessor(
|
||||
ApplicationContext applicationContext) {
|
||||
return new SentinelBeanPostProcessor(applicationContext);
|
||||
|
@ -6,6 +6,12 @@
|
||||
"defaultValue": true,
|
||||
"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",
|
||||
"type": "java.lang.Boolean",
|
||||
|
Loading…
x
Reference in New Issue
Block a user