1.nacos的配置必须在bootstap.yml里面写,因为要在spring boot之前加载.
spring:
application:
name: doia
cloud:
nacos:
config:
server-addr: 10.0.4.76:8848 #nacos配置中心地址
file-extension: yaml #配置文件拓展名 dataId = application.name + file-extension
namespace: 6515bbb7-cd5a-47a1-ab38-53e716930e21 #dev
group: DEFAULT_GROUP
ext-config[0]:
data-id: doia-common.yaml
group: COMMON_GROUP
refresh: true
ext-config[1]:
data-id: doia-refresh.yaml
group: REFRESH_GROUP
refresh: true
网友评论