当前位置:网站首页>笔记——记录@RefreshScope动态刷新配置失效的解决方式
笔记——记录@RefreshScope动态刷新配置失效的解决方式
2022-07-23 02:29:00 【专注写bug】
前言
最初在@Component修饰的bean上,增加了一个@RefreshScope,用于处理nacos配置中心配置项变更后刷新配置的设置。
但是项目启动,却出现了:
解决方式
将@RefreshScope和@Value结合的代码,改为:
@Component
@ConfigurationProperties(prefix = "config")
public class KettleFunction extends AbstractFunction {
private String info;
}
的方式。
nacos中的配置文件信息为:
config:
info: 666
完美解决
参考资料
边栏推荐
- Matplotlib保存图片到文件
- 权限系统就该这么设计,yyds
- Hfish蜜罐的搭建与测试
- hdu-7141 Ball (bitset)
- 零基础怎么学习单片机?
- BGP reflector, federal, routing rules
- 亿级融资事件占比超30%,超自动化的下一站是何处?丨曼孚科技
- How to preserve peptide nucleic acid | peptide nucleic acid containing azobenzene unit (n-pna) | 99Tcm labeled c-myc mRNA
- Realize multi-level conditional query (similar to JD multi-level add query)
- Blog milestones
猜你喜欢
随机推荐
【无标题】
中信期货网上开户是否安全,网上开户会被骗吗?
PHP RSA 生成公钥私钥 PSA2 加密解密
canal 第6篇
BGP reflector, federal, routing rules
NN in pytorch Modulelist and nn.sequential
Leetcode 110. balanced binary tree
LEADTOOLS 20-22 Crack-DotNetCore!!!
How to determine the end point of a software test
PNA PNA modified polypeptide Pro Phe Arg PNA (s-2302) | DNP Gly x l Pro Gly PNA
PNA modified polypeptide suc ala Pro ala PNA | suc ala Glu Pro Phe PNA
Burpsuite 插件的学习与使用
31岁才转行程序员,目前34了,我来说说我的经历和一些感受吧...
Is it safe to apply for a stock trading account and open an account on your mobile phone?
Canal Chapter 6
抖音白天与晚上触发不同特效的Graph节点编写
MySQL数据库UDF提权学习
Airiot Q & A issue 5 | how to use low code business flow engine?
【洛谷】P1972 HH的项链
MySQL数据库提权学习








