diff --git a/nacos-spring-context/pom.xml b/nacos-spring-context/pom.xml index 6e93b984..74704f51 100644 --- a/nacos-spring-context/pom.xml +++ b/nacos-spring-context/pom.xml @@ -5,14 +5,14 @@ nacos-spring-parent com.alibaba.nacos - 1.1.0 + 1.1.1 ../pom.xml 4.0.0 com.alibaba.nacos nacos-spring-context - 1.1.0 + 1.1.1 Alibaba Nacos :: Spring :: Context jar diff --git a/nacos-spring-context/src/main/java/com/alibaba/nacos/spring/context/properties/config/NacosConfigurationPropertiesBinder.java b/nacos-spring-context/src/main/java/com/alibaba/nacos/spring/context/properties/config/NacosConfigurationPropertiesBinder.java index e9ed0915..bb5551b7 100644 --- a/nacos-spring-context/src/main/java/com/alibaba/nacos/spring/context/properties/config/NacosConfigurationPropertiesBinder.java +++ b/nacos-spring-context/src/main/java/com/alibaba/nacos/spring/context/properties/config/NacosConfigurationPropertiesBinder.java @@ -116,6 +116,13 @@ protected void bind(final Object bean, final String beanName, // Add a Listener if auto-refreshed if (properties.autoRefreshed()) { + + String content = getContent(configService, dataId, groupId); + + if (hasText(content)) { + doBind(bean, beanName, dataId, groupId, type, properties, content, + configService); + } Listener listener = new AbstractListener() { @Override @@ -139,13 +146,6 @@ public void receiveConfigInfo(String config) { } } } - - String content = getContent(configService, dataId, groupId); - - if (hasText(content)) { - doBind(bean, beanName, dataId, groupId, type, properties, content, - configService); - } } protected void doBind(Object bean, String beanName, String dataId, String groupId, diff --git a/nacos-spring-samples/nacos-embedded-webserver/pom.xml b/nacos-spring-samples/nacos-embedded-webserver/pom.xml index 1d586fc8..7735db0b 100644 --- a/nacos-spring-samples/nacos-embedded-webserver/pom.xml +++ b/nacos-spring-samples/nacos-embedded-webserver/pom.xml @@ -5,7 +5,7 @@ nacos-spring-parent com.alibaba.nacos - 1.1.0 + 1.1.1 ../../pom.xml 4.0.0 diff --git a/nacos-spring-samples/nacos-spring-webmvc-sample/pom.xml b/nacos-spring-samples/nacos-spring-webmvc-sample/pom.xml index 1425a0fd..329ba957 100644 --- a/nacos-spring-samples/nacos-spring-webmvc-sample/pom.xml +++ b/nacos-spring-samples/nacos-spring-webmvc-sample/pom.xml @@ -5,7 +5,7 @@ nacos-spring-samples com.alibaba.nacos - 1.1.0 + 1.1.1 ../pom.xml 4.0.0 diff --git a/nacos-spring-samples/pom.xml b/nacos-spring-samples/pom.xml index 07455eac..5570363f 100644 --- a/nacos-spring-samples/pom.xml +++ b/nacos-spring-samples/pom.xml @@ -5,7 +5,7 @@ nacos-spring-parent com.alibaba.nacos - 1.1.0 + 1.1.1 ../pom.xml 4.0.0 diff --git a/pom.xml b/pom.xml index a254abc1..4f74909c 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.alibaba.nacos nacos-spring-parent - 1.1.0 + 1.1.1 Alibaba Nacos :: Spring :: POM pom