一 项目中的配置文件
# Tomcat
server:
port: 9092
# Spring
spring:
application:
# 应用名称
name: damagePrevention-disaster
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 10.20.110.53:18848
# server-addr: 127.0.0.1:8848
config:
# 配置中心地址
server-addr: 10.20.110.53:18848
# server-addr: 127.0.0.1:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
二 nacos 中的配置文件
# spring配置
spring:
redis:
host: 10.20.110.53
port: 16379
password: Tsit&