Comments (6)
/kind question
/area nacos
from spring-cloud-alibaba.
基于 @ConfigurationProperties
声明的属性配置类,可以实时动态刷新(refresh-enabled 默认为开启状态),如果使用 Spring 中的 @Value
方式,在类上添加 @RefreshScope
也可以实现动态刷新。
如果你的动态刷新功能失效,可以贴一下你代码中具体是如何使用的
from spring-cloud-alibaba.
基于
@ConfigurationProperties
声明的属性配置类,可以实时动态刷新(refresh-enabled 默认为开启状态),如果使用 Spring 中的@Value
方式,在类上添加@RefreshScope
也可以实现动态刷新。如果你的动态刷新功能失效,可以贴一下你代码中具体是如何使用的
如果不使用 @ConfigurationProperties 、@RefreshScope和 @NacosValue ,单单只是使用 refresh-enabled 能否生效。但是我用了后发现不生效并不会实时刷新
from spring-cloud-alibaba.
@Mredust ,@Value
必须配合 @RefreshScope
一起使用才行实现动态刷新,这个机制和 Spring Cloud 官方的定义保持一致,因为有的场景是希望启动后值就固定,不允许动态刷新,所以需要动态刷新的场景需要手动添加 @RefreshScope
from spring-cloud-alibaba.
@Mredust ,
@Value
必须配合@RefreshScope
一起使用才行实现动态刷新,这个机制和 Spring Cloud 官方的定义保持一致,因为有的场景是希望启动后值就固定,不允许动态刷新,所以需要动态刷新的场景需要手动添加@RefreshScope
明白了,感谢感谢
from spring-cloud-alibaba.
This issue has been open 30 days with no activity. This will be closed in 7 days.
from spring-cloud-alibaba.
Related Issues (20)
- 配置格式为properties时,换行符\n读取后变成\\n HOT 2
- idea 导入项目无法自动识别源根, HOT 3
- [GLCC] Spring Cloud Alibaba ecosystem, add rpc component
- spring cloud gateway run failed,while built with native-image HOT 1
- [GLCC] Spring Cloud Admin HOT 1
- The dependency groupId of spring-ai-core in spring-cloud-starter-alibaba-ai module is not found. HOT 2
- [Optimize] Optimizing autoconfiguration properties in seata
- 2.2.10 版本,什么时候可以发布一个release版本呀 HOT 1
- spring-cloud-starter-dubbo 2021.0.1.0 中 feign-core版本大于11.8时,feign.MethodMetadata中queryMapEncoded方法不存在 HOT 3
- Is the spring-cloud-starter-alibaba-ai version wrong? HOT 4
- Nacos无法读取全部远程配置文件, 报is empty HOT 2
- [Sentinel] Properties bind failed
- Hope to increase custom host function HOT 1
- [AI] SpringCloudAlibaba HOT 1
- 如何看待阿里巴巴数学竞赛造假? HOT 1
- [AI] sca ai rag example run failed HOT 1
- 代码遗漏 HOT 1
- show case code may contains wrong configuration
- nacos .yaml格式文件解析属性错误
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-alibaba.