Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribute @PropertySource declarations in AOT optimized contexts #28976

Closed
sbrannen opened this issue Aug 17, 2022 · 1 comment
Closed

Contribute @PropertySource declarations in AOT optimized contexts #28976

sbrannen opened this issue Aug 17, 2022 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Aug 17, 2022

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

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 17, 2022
@sbrannen sbrannen added this to the 6.0.0-M6 milestone Aug 17, 2022
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Aug 20, 2022
@snicoll snicoll self-assigned this Aug 23, 2022
@snicoll snicoll changed the title Track changes to Environment when processing ApplicationContext for AOT Contribute @PropertySource declarations in AOT optimized contexts Aug 23, 2022
@snicoll
Copy link
Member

snicoll commented Aug 24, 2022

This is blocked by #29005

@snicoll snicoll added the status: blocked An issue that's blocked on an external project change label Aug 24, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Sep 7, 2022
This commit records `@PropertySource` declarations defined on
configuration classes so that these are contributed to the environment
of a context that is initialized by generated code.

See spring-projectsgh-28976
@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants