How to disable Hystrix while using Sentinel

laawzig2  于 2022-10-19  发布在  其他
关注(0)|答案(2)|浏览(197)

More than one implementation of @EnableCircuitBreaker (now relying on @conditionals to pick one): [com.alibaba.cloud.sentinel.custom.SentinelCircuitBreakerConfiguration, org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration]

The version of spring boot and cloud:

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.8.RELEASE</version>

<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR10</version>

If I exclude those Hystrix dependencies, the application will throw exception. How to disable Hystrix while using Sentinel?

scyqe7ek

scyqe7ek2#

use @SpringBootApplication and @EnableDiscoveryClient replace the @SpringCloudApplication.

相关问题