Overview
The underlying issue is that changes to the Environment are not present in an AOT optimized ApplicationContext.
For example, if a @Configuration class is annotated with @PropertySource the property sources will not be applied to the Environment when running the ApplicationContext in AOT mode.
The same holds true for @TestPropertySource; however, I plan to take a different approach to honoring test property sources with AOT testing support.
Related Issues
- https://github.com/spring-projects-experimental/spring-native/issues/1334
Comment From: snicoll
This is blocked by #29005