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

Add support for refreshing an ApplicationContext for AOT processing #28065

Closed
snicoll opened this issue Feb 17, 2022 · 0 comments
Closed

Add support for refreshing an ApplicationContext for AOT processing #28065

snicoll opened this issue Feb 17, 2022 · 0 comments
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

@snicoll
Copy link
Member

snicoll commented Feb 17, 2022

For us to be able to pre-process an ApplicationContext at build-time, we need a way to "refresh" it up to a point where it is ready to create bean instances, this includes:

  • Prepare the BeanFactory
  • Invoke BeanDefinitionRegistryPostProcessor implementations
  • Invoke MergedBeanDefinitionPostProcessor implementations (note that these are special extensions of BeanPostProcessor that operates at the (merged) BeanDefinition level
@snicoll snicoll 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 Feb 17, 2022
@snicoll snicoll added this to the 6.0.0-M3 milestone Feb 17, 2022
@snicoll snicoll self-assigned this Feb 17, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Mar 6, 2022
This commit adds a way to refresh a GenericApplicationContext for ahead
of time processing: refreshForAotProcessing() processes the bean factory
up to a point where it is about to create bean instances.

MergedBeanDefinitionPostProcessor implementations are the only bean
post processors that are invoked during this phase.

Closes spring-projectsgh-28065
snicoll added a commit to snicoll/spring-framework that referenced this issue Mar 7, 2022
This commit adds a way to refresh a GenericApplicationContext for ahead
of time processing: refreshForAotProcessing() processes the bean factory
up to a point where it is about to create bean instances.

MergedBeanDefinitionPostProcessor implementations are the only bean
post processors that are invoked during this phase.

Closes spring-projectsgh-28065
snicoll added a commit to snicoll/spring-framework that referenced this issue Mar 8, 2022
This commit adds a way to refresh a GenericApplicationContext for ahead
of time processing: refreshForAotProcessing() processes the bean factory
up to a point where it is about to create bean instances.

MergedBeanDefinitionPostProcessor implementations are the only bean
post processors that are invoked during this phase.

Closes spring-projectsgh-28065
@snicoll snicoll closed this as completed in b5695b9 Mar 9, 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

1 participant