摘要: 本文基于Springboot 3.3.2及Springcloud 2023.0.1版本编写。 Spring Scoped Proxy是什么 在使用Spring cloud配置中心动态配置更新功能时,笔者发现在给一个类加上@RefreshScope注解后,其中@Value注入的字段会被自动更新。起初笔 阅读全文
posted @ 2024-08-06 18:22 飞翔的blu 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 背景 公司规范要求配置文件里不能出现明文的密码。最近项目引入了Nacos作为服务的配置中心,使用的是spring-cloud-starter-alibaba-nacos-config这个包。 基本的bootstrap.yaml配置如下: spring: cloud: nacos: config: s 阅读全文
posted @ 2024-07-13 19:20 飞翔的blu 阅读(119) 评论(0) 推荐(1) 编辑