diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c27d74ee..dafd6abbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,3 +10,5 @@ - [change escape way into encode](https://github.com/Tencent/spring-cloud-tencent/pull/251) - [feat:support reading configuration from application.yml or application.properties.](https://github.com/Tencent/spring-cloud-tencent/pull/259) - [fix:fix ClassNotFoundException while not importing openfeign when using circuit-breaker module.](https://github.com/Tencent/spring-cloud-tencent/pull/269) +- [Update GitHub Actions workflow](https://github.com/Tencent/spring-cloud-tencent/pull/273) +- [fix:fix TypeNotPresentException in @ConditionalOnClass of router.](https://github.com/Tencent/spring-cloud-tencent/pull/276) diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java index a57c16857..690ba9f0c 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java @@ -27,8 +27,6 @@ import com.tencent.cloud.polaris.router.config.properties.PolarisNearByRouterPro import com.tencent.cloud.polaris.router.config.properties.PolarisRuleBasedRouterProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor; -import org.springframework.cloud.gateway.filter.LoadBalancerClientFilter; import org.springframework.cloud.netflix.ribbon.RibbonClients; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -49,14 +47,14 @@ public class RouterAutoConfiguration { @Bean @Order(HIGHEST_PRECEDENCE) - @ConditionalOnClass(LoadBalancerInterceptor.class) + @ConditionalOnClass(name = "org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor") public LoadBalancerInterceptorBeanPostProcessor loadBalancerInterceptorBeanPostProcessor() { return new LoadBalancerInterceptorBeanPostProcessor(); } @Bean @Order(HIGHEST_PRECEDENCE) - @ConditionalOnClass(LoadBalancerClientFilter.class) + @ConditionalOnClass(name = "org.springframework.cloud.gateway.filter.LoadBalancerClientFilter") public LoadBalancerClientFilterBeanPostProcessor loadBalancerClientFilterBeanPostProcessor() { return new LoadBalancerClientFilterBeanPostProcessor(); }