Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring+spring MVC不能进行自动热更新 #180

Closed
nkorange opened this issue Jan 7, 2020 · 4 comments
Closed

spring+spring MVC不能进行自动热更新 #180

nkorange opened this issue Jan 7, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@nkorange
Copy link

nkorange commented Jan 7, 2020

Refer to alibaba/nacos#2202

@rushsky518
Copy link
Contributor

非注解方式时,当远程配置文件改变后, environment 中的配置没有变化

@chuntaojun
Copy link
Member

非注解方式时,当远程配置文件改变后, environment 中的配置没有变化

看下listener是否有接收到nacos的推送,有可能是因为Spring Context的关系导致的

@chuntaojun chuntaojun added the bug Something isn't working label Mar 5, 2020
@chuntaojun chuntaojun added this to To do in nacos-spring-project via automation Mar 5, 2020
@chuntaojun
Copy link
Member

该问题已修复,由于xml配置解析没有解析相应的而外信息项导致的

nacos-spring-project automation moved this from To do to Done Mar 5, 2020
@jungleyoung
Copy link

jungleyoung commented Aug 3, 2023

我使用nacos-spring-context 1.1.1 也遇到相同的问题,需要如何解决呢?
使用配置类配置时可以实现配置热更新但是使用xml配置就不行了。
配置类:
@Profile(value = {"dev","default"}) @Configuration @EnableNacosConfig(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848", username="read",password="read",namespace = "41635d4a-1a7f-4315-a6ae-5a9056ccac75")) @NacosPropertySource(dataId = "dev-nacos.properties", groupId = "DEFAULT_GROUP", autoRefreshed = true, properties = @NacosProperties()) public class NacosConfDev { }
xml:

<nacos:annotation-driven/>
<nacos:global-properties server-addr="127.0.0.1:8848" namespace="41635d4a-1a7f-4315-a6ae-5a9056ccac75" username="read" password="read"/>
<nacos:property-source data-id="dev-nacos.properties" group-id="DEFAULT_GROUP" auto-refreshed="true"  />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

4 participants