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

Implement an AOT equivalent of AutowiredAnnotationBeanPostProcessor #27921

Closed
snicoll opened this issue Jan 11, 2022 · 2 comments
Closed

Implement an AOT equivalent of AutowiredAnnotationBeanPostProcessor #27921

snicoll opened this issue Jan 11, 2022 · 2 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 Jan 11, 2022

InjectionMetadata provides some information we could use at build-time. For instance, if AutowiredAnnotationBeanPostProcessor is enabled for the ApplicationContext that app uses without AOT, we should be able to find out about autowired elements, potentially even reusing any custom configuration that was set on the post processor.

There is also some logic in the way injection works that we may need to streamline to be consistent.

@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 Jan 11, 2022
@snicoll snicoll added this to the 6.0.0-M3 milestone Jan 11, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 27, 2022
@snicoll snicoll self-assigned this Jan 27, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 28, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 28, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 31, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 31, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Jan 31, 2022
@snicoll
Copy link
Member Author

snicoll commented Jan 31, 2022

We're trying to design an interface that allows a BeanPostProcessor to opt-in for providing a code contributor that replaces what it does at runtime. The current model is implementing an interface that returns a contributor based on a RootBeanDefinition, similar to MergedBeanDefinitionPostProcessor#postProcessMergedBeanDefinition.

While the processor would be excluded by default at runtime, it would be nice if it could indicate that it needs to run again. If we want such a feature, the phase at which the BeanFactory is processed should become a high-level concept, something like "build-time" vs. "runtime" vs. "optimized-runtime".

snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 3, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 3, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 3, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 3, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 3, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 4, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 7, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 7, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 7, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 9, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 10, 2022
snicoll added a commit to snicoll/spring-framework that referenced this issue Feb 10, 2022
@snicoll
Copy link
Member Author

snicoll commented Feb 14, 2022

We need #28047 to move forward on this one.

@snicoll snicoll changed the title Expose an API that detects bean injection points Implement an AOT equivalent of AutowiredAnnotationBeanPostProcessor Feb 14, 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