spring-cloud-alibaba
spring-cloud-alibaba copied to clipboard
when use spring-cloud-alibaba-dependencies2021.1 and spring-boot-dependencies2.4.2, bootstrap.properties key value pair can't use @value getget
我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。 We recommend using English. If you are non-native English speaker, you can use the translation software.
Which Component nacos config
Describe the bug when use spring-cloud-alibaba-dependencies2021.1 and spring-boot-dependencies2.4.2, test nacos config , in bootstrap.properties, define key value pair k1=v1, when use @Value("${k1}") get the value, java.lang.IllegalArgumentException: Could not resolve placeholder 'k1' in value "${k1}"
when use spring-cloud-alibaba-dependencies2.2.2.RELEASE and spring-boot-dependencies2.3.7.RELEASE, it run correct。 but in wiki doc suggest spring-cloud-alibaba-dependencies2021.1 and spring-boot-dependencies2.4.2 To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior Correct injection value, can get value from bootstrap.properties
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here. e.g. MacOS 、Java8 、 Version 0.2.1.RELEASE