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

pull/1266/head
Haotian Zhang 8 months ago committed by GitHub
parent c460d8500a
commit 5bb4320a86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,4 +6,5 @@
- [feat: support lane router](https://github.com/Tencent/spring-cloud-tencent/pull/1256)
- [feat: add lane router examples](https://github.com/Tencent/spring-cloud-tencent/pull/1260)
- [feat:upgrade jackson version.](https://github.com/Tencent/spring-cloud-tencent/pull/1262)
- [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1263)
- [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1263)
- [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1272)

@ -89,7 +89,7 @@
<properties>
<!-- Project revision -->
<revision>1.14.0-2023.0.0-RC1</revision>
<revision>1.14.0-2023.0.0-SNAPSHOT</revision>
<!-- Spring Framework -->
<spring.framework.version>6.1.4</spring.framework.version>

@ -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,

@ -71,10 +71,10 @@
<properties>
<!-- Project revision -->
<revision>1.14.0-2023.0.0-RC1</revision>
<revision>1.14.0-2023.0.0-SNAPSHOT</revision>
<!-- Polaris SDK version -->
<polaris.version>1.15.4</polaris.version>
<polaris.version>1.15.5-SNAPSHOT</polaris.version>
<!-- Dependencies -->
<guava.version>32.0.1-jre</guava.version>

Loading…
Cancel
Save