diff --git a/README.md b/README.md index 1c664d0..d86265d 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,12 @@ gitee项目地址:[https://gitee.com/lianjiatech/retrofit-spring-boot-starter] com.github.lianjiatech retrofit-spring-boot-starter - 2.3.0 + 2.3.1 ``` > **强烈建议使用最新版本,稳定无bug!** -> **`2.2.13`和`2.2.14`对配置中心有兼容性bug,请勿使用!!!** - **本项目依赖Retrofit-2.9.0,okhttp-3.14.9,okio-1.17.5版本,如果冲突,烦请手动引入相关jar包**。完整依赖如下: @@ -66,7 +64,7 @@ gitee项目地址:[https://gitee.com/lianjiatech/retrofit-spring-boot-starter] com.github.lianjiatech retrofit-spring-boot-starter - 2.3.0 + 2.3.1 com.squareup.okhttp3 diff --git a/pom.xml b/pom.xml index 9f096d5..79e827c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.lianjiatech retrofit-spring-boot-starter - 2.3.0 + 2.3.1 retrofit-spring-boot-starter retrofit-spring-boot-starter diff --git a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/config/RetrofitAutoConfiguration.java b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/config/RetrofitAutoConfiguration.java index 0cfc163..9a36a46 100644 --- a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/config/RetrofitAutoConfiguration.java +++ b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/config/RetrofitAutoConfiguration.java @@ -14,7 +14,6 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import com.alibaba.csp.sentinel.SphU; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; @@ -36,7 +35,6 @@ import com.github.lianjiatech.retrofit.spring.boot.log.LoggingInterceptor; import com.github.lianjiatech.retrofit.spring.boot.retry.RetryInterceptor; -import io.github.resilience4j.circuitbreaker.CircuitBreaker; import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry; import okhttp3.ConnectionPool; import retrofit2.converter.jackson.JacksonConverterFactory; @@ -146,7 +144,7 @@ ServiceChooseInterceptor serviceChooseInterceptor(@Autowired ServiceInstanceChoo @Bean @ConditionalOnMissingBean - @ConditionalOnClass(SphU.class) + @ConditionalOnClass(name = "com.alibaba.csp.sentinel.SphU") @ConditionalOnProperty(name = "retrofit.degrade.degrade-type", havingValue = RetrofitDegrade.SENTINEL) public RetrofitDegrade sentinelRetrofitDegrade() { return new SentinelRetrofitDegrade(); @@ -154,7 +152,7 @@ public RetrofitDegrade sentinelRetrofitDegrade() { @Bean @ConditionalOnMissingBean - @ConditionalOnClass(CircuitBreaker.class) + @ConditionalOnClass(name = "io.github.resilience4j.circuitbreaker.CircuitBreaker") @ConditionalOnProperty(name = "retrofit.degrade.degrade-type", havingValue = RetrofitDegrade.RESILIENCE4J) public RetrofitDegrade resilience4jRetrofitDegrade() { return new Resilience4jRetrofitDegrade(CircuitBreakerRegistry.ofDefaults());