-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
声明式动态刷新不生效 #3747
Comments
/kind question |
基于 如果你的动态刷新功能失效,可以贴一下你代码中具体是如何使用的 |
如果不使用 @ConfigurationProperties 、@RefreshScope和 @NacosValue ,单单只是使用 refresh-enabled 能否生效。但是我用了后发现不生效并不会实时刷新 |
@Mredust , |
明白了,感谢感谢 |
This issue has been open 30 days with no activity. This will be closed in 7 days. |
版本:boot:2.4.2 cloud:2020.0.1 cloud alibaba:2021.1 nacos:1.4.1
spring:
application:
name: nacos-demo
profiles:
active: dev
cloud:
nacos:
server-addr: 192.168.91.131:8848
discovery:
namespace: ${spring.profiles.active}
group: nacos-demo
cluster-name: gz
config:
namespace: ${spring.profiles.active}
group: nacos-demo
file-extension: yaml
refresh-enabled: true
extension-configs:
- data-id: nacos-demo-api-${spring.profiles.active}.yaml
group: nacos-demo
refresh: true
- data-id: nacos-demo-service-${spring.profiles.active}.yaml
group: nacos-demo
refresh: true
shared-configs:
- data-id: common-${spring.profiles.active}.yaml
group: common-dev
refresh: true
对动态刷新测试过@RefreshScope是可以的,换成声明式的refresh-enabled: true就不行。在nacos服务配置修改文件并发布后控制台是有日志说明我修改过文件,最后请求时还是之前的配置信息,但是重启后配置信息是重新读取了。请问这个声明式的配置是可以用的吗
The text was updated successfully, but these errors were encountered: