Closed liucyu closed 5 years ago
Hi @liucyu, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.
Can't get the configuration, but if you get the configuration in pure Java mode
bootstrap.properties
:
spring.application.name=nacos-config
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
Log
2019-05-29 16:44:12.704 INFO 65456 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='NACOS', propertySources=[NacosPropertySource {name='nacos-config.properties'}]}
Code
result
如果是nacos-client没问题,但是spring-cloud-nacos有问题,请到spring cloud alibaba提交issue。
@nkorange 我的springboot版本是2.1.4.RELEASE springcloud版本是 Greenwich.SR1
请到spring cloud alibaba提交issue。
步骤
结果
拿不到配置,但是如果按照纯Java方式却能获取到配置
bootstrap.properties
:spring.application.name=nacos-config
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
日志
2019-05-29 16:44:12.704 INFO 65456 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='NACOS', propertySources=[NacosPropertySource {name='nacos-config.properties'}]}
代码
结果