将配置文件导入Nacos
warning:
这篇文章距离上次修改已过305天,其中的内容可能已经有所变动。
登录nacos控制台(http://localhost:8848/nacos/), 访问命名空间 -> 新建命名空间
命名空间ID: 57d41ddd-c089-449f-8921-bd0e8af14ddc
命名空间名称:lamp-cloud
描述:lamp-cloud开源版


--- # nacos 配置
spring:
cloud:
nacos:
# nacos 服务地址
server-addr: 0.0.0.0:8848
discovery:
# 注册组
group: DEFAULT_GROUP
#要和上面的命名空间一致
namespace: c06db00a-601d-4e59-94ed-a5149a98ef2e
config:
# username: nacos
# password: nacos
# 配置组
group: DEFAULT_GROUP
namespace: c06db00a-601d-4e59-94ed-a5149a98ef2e
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- data-id: application.${spring.cloud.nacos.config.file-extension}
refresh: true


