mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
This commit aligns `SpringBootTest`s to also use `ApplicationEnvironment` instead of `StandardEnvironment`. This prevents the side-effect of active profiles from `@ActiveProfiles` from being added to the environment when doGetActiveProfiles is called. In this case, calling `addActiveProfiles()` in the environment post processor would result in `@ActiveProfiles` being added to the environment first, resulting in the wrong order. The additional call to `setActiveProfiles()` is also not necessary when using ApplicationEnvironment because that call was put in place to prevent the side-effect which `ApplicationEnvironment` does not have. Fixes gh-28530 |
||
---|---|---|
.. | ||
src | ||
application.yml | ||
build.gradle |