发现的springboot的bug
测试使用的springboot版本2.6.9, 输出结果hello3
切换使用2.7.0或者2.7.1后(两个版本的结果一样),输出结果hello2
翻阅官方文档:https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config
springboot 2.7.x 存在临时属性bug。该Bug已提交Github
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#springboottest-property-source-precendence
@SpringBootTest Property Source Precendence
Test property sources added by @SpringBootTest using either the properties attribute or the @TestPropertySource annotation are now added above the command line property source. If you are in the unlikely situation of having a @SpringBootTest that uses both properties and args (and with the same property name), you may need to change things around.



