8.【Spring Cloud Alibaba】配置管理-Nacos
2024-10-08 22:14:57
使用Nacos管理配置
架构图
配置文件遵循的格式 bootstrap.yml
pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
bootstrap.yml
spring:
cloud:
nacos:
config:
server-addr: localhost:8848
file-extension: yaml
application:
name: content-center
profiles:
active: dev
content-center-dev.yaml
nacos:
config: okkkkkkk
配置属性动态刷新与回滚
@RefreshScope
应用的配置共享
引导上下文(applicationContext父上下文)
数据持久化
搭建生产可用的nacos集群
配置最佳实践总结
最新文章
- SVProgressHUD
- 深度学习入门教程UFLDL学习实验笔记三:主成分分析PCA与白化whitening
- python技巧 之文件读取
- JS 初学正则表达式
- 使用Service.Stack客户端编写redis pub sub的方法
- js事件执行顺序
- 中石油-高精度阶乘-java
- REST深入浅出
- Lotto(dfs)
- Struts2的通配符配置方式
- nginx加密,访问接口认证
- Linux下的邮件发送
- linux文件 特殊权限的使用
- rabbitMQ模式
- js 中三元运算符的运用
- oracle 分区 查询
- [Shell]一张图知道Shell(图)
- 05_ssm基础(四)之Spring基础二
- Dig命令解析结果
- url传递数据