使用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