[WARN ] 2023-12-12 23:41:36,241 --main-- [com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder] Ignore the empty nacos configuration and get it based on dataId[nacos-order-service] & group[DEFAULT_GROUP]
[WARN ] 2023-12-12 23:41:36,249 --main-- [com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder] Ignore the empty nacos configuration and get it based on dataId[nacos-order-service.yaml] & group[DEFAULT_GROUP]
[INFO ] 2023-12-12 23:41:36,262 --main-- [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] Located property source: [BootstrapPropertySource {name='bootstrapProperties-nacos-order-service-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service,DEFAULT_GROUP'}]
创建两个环境的服务,一个dev、一个test,根据实际情况创建
简单看一下日志打印信息
dev环境
[WARN ] 2023-12-12 23:59:34,688 --main-- [com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder] Ignore the empty nacos configuration and get it based on dataId[nacos-order-service] & group[DEFAULT_GROUP]
[INFO ] 2023-12-12 23:59:34,713 --main-- [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] Located property source: [BootstrapPropertySource {name='bootstrapProperties-nacos-order-service-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service,DEFAULT_GROUP'}]
[INFO ] 2023-12-12 23:59:34,724 --main-- [com.app.order.OrderApplication] The following profiles are active: dev
test环境
[WARN ] 2023-12-13 00:00:08,837 --main-- [com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder] Ignore the empty nacos configuration and get it based on dataId[nacos-order-service] & group[DEFAULT_GROUP]
[WARN ] 2023-12-13 00:00:08,858 --main-- [com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder] Ignore the empty nacos configuration and get it based on dataId[nacos-order-service-test.yaml] & group[DEFAULT_GROUP]
[INFO ] 2023-12-13 00:00:08,859 --main-- [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] Located property source: [BootstrapPropertySource {name='bootstrapProperties-nacos-order-service-test.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-nacos-order-service,DEFAULT_GROUP'}]
[INFO ] 2023-12-13 00:00:08,868 --main-- [com.app.order.OrderApplication] The following profiles are active: test