fix:fix nearby router properties loading bug. (#1273)

pull/1276/head
Haotian Zhang 8 months ago committed by GitHub
parent ba462408e6
commit 3b08af66d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -8,3 +8,4 @@
- [feat: support lane router](https://github.com/Tencent/spring-cloud-tencent/pull/1269)
- [feat: add lane router examples](https://github.com/Tencent/spring-cloud-tencent/pull/1270)
- [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1271)
- [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1273)

@ -44,7 +44,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.Order;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.web.client.RestTemplate;
@ -59,7 +58,6 @@ import static org.springframework.core.Ordered.HIGHEST_PRECEDENCE;
@Configuration(proxyBeanMethods = false)
@ConditionalOnPolarisRouterEnabled
@LoadBalancerClients(defaultConfiguration = LoadBalancerConfiguration.class)
@Import({PolarisNearByRouterProperties.class, PolarisMetadataRouterProperties.class, PolarisRuleBasedRouterProperties.class})
public class RouterAutoConfiguration {
@Bean

@ -19,11 +19,14 @@
package com.tencent.cloud.polaris.router.config;
import com.tencent.cloud.polaris.router.RouterConfigModifier;
import com.tencent.cloud.polaris.router.config.properties.PolarisMetadataRouterProperties;
import com.tencent.cloud.polaris.router.config.properties.PolarisNearByRouterProperties;
import com.tencent.cloud.polaris.router.config.properties.PolarisRuleBasedRouterProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
/**
* RouterConfigModifierAutoConfiguration.
@ -32,6 +35,7 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnPolarisRouterEnabled
@Import({PolarisNearByRouterProperties.class, PolarisMetadataRouterProperties.class, PolarisRuleBasedRouterProperties.class})
public class RouterConfigModifierAutoConfiguration {
@Bean

@ -39,6 +39,7 @@ public class FeignAutoConfigurationTest {
.withConfiguration(AutoConfigurations.of(
MetadataAutoConfiguration.class,
RouterAutoConfiguration.class,
RouterConfigModifierAutoConfiguration.class,
PolarisContextAutoConfiguration.class,
FeignAutoConfiguration.class,
ApplicationContextAwareUtils.class

@ -42,6 +42,7 @@ public class RouterAutoConfigurationTests {
TestRestTemplatesConfiguration.class,
MetadataAutoConfiguration.class,
RouterAutoConfiguration.class,
RouterConfigModifierAutoConfiguration.class,
RouterBootstrapAutoConfiguration.class,
PolarisContextAutoConfiguration.class,
RouterAutoConfiguration.RouterLabelRestTemplateConfig.class,

@ -74,7 +74,7 @@
<revision>1.14.0-2022.0.5-SNAPSHOT</revision>
<!-- Polaris SDK version -->
<polaris.version>1.15.4-SNAPSHOT</polaris.version>
<polaris.version>1.15.5-SNAPSHOT</polaris.version>
<!-- Dependencies -->
<guava.version>32.0.1-jre</guava.version>

Loading…
Cancel
Save