Type: bug report
What happens to configuration file strings when using spring in multiple environments is that the configuration in the default environment is simply read from another environment. This is a serious problem
Isolate the spring environment
add application.yml
add application-test.yml
application.yml Middle add configuration spring:cloud:nacos:discovery:namespace:xxxxxx
3.run springboot applicationContext
add runtime config -Dspring.profiles.active=test
You will find that he can read the namespace in application.yml
macOS-10.14.3 (18D42)
oracle jdk 1.8.0_111
springframework 5.1.7.release
springboot 2.1.5.release
spring-cloud-alibaba-nacos-discovery-0.9.0.release
The individual eyeballs did not use the spring context to initialize it, resulting in configuration inconsistencies
Hi @error0702, 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.
Type: bug report
What happens to configuration file strings when using spring in multiple environments is that the configuration in the default environment is simply read from another environment. This is a serious problem
Isolate the spring environment
add application.yml
add application-test.yml
application.yml Middle add configuration spring:cloud:nacos:discovery:namespace:xxxxxx
3.run springboot applicationContext
add runtime config -Dspring.profiles.active=test
You will find that he can read the namespace in application.yml
macOS-10.14.3 (18D42)
oracle jdk 1.8.0_111
springframework 5.1.7.release
springboot 2.1.5.release
spring-cloud-alibaba-nacos-discovery-0.9.0.release
The individual eyeballs did not use the spring context to initialize it, resulting in configuration inconsistencies
please help me, thank you
可以用中文描述下问题吗?
Most helpful comment
please help me, thank you