Since Spring Boot 2.4 values in test application.properties are not used, if the same property exists in an application.yaml file in the main directory.
The attached demo project shows the issue. It works as expected when the spring.config.use-legacy-processing=true
property is active
Comment From: mbhave
Thanks for the sample @alexalbr. The order in which .properties
and .yaml
files are processed appears to have switched in 2.4.
Comment From: encircled
Duplicate https://github.com/spring-projects/spring-boot/issues/24497