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

Decouple BeanDefinitionRegistryPostProcessor implementations #8611

Closed
snicoll opened this issue May 4, 2023 · 3 comments · Fixed by #8660 or #8661
Closed

Decouple BeanDefinitionRegistryPostProcessor implementations #8611

snicoll opened this issue May 4, 2023 · 3 comments · Fixed by #8660 or #8661

Comments

@snicoll
Copy link
Member

snicoll commented May 4, 2023

While reviewing an issue in Spring Framework, I've noticed that Spring Integration has BeanDefinitionRegistryPostProcessor implementations that are also doing something else.

We're considering reviewing this contract so that such post-processors are automatically excluded from AOT processing (as they operation on the bean factory that's pre-processed by it). Can you please review DefaultConfiguringBeanFactoryPostProcessor and MessagingAnnotationPostProcessor so that they only perform bean definition registry post-processing and nothing else?

@snicoll snicoll added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels May 4, 2023
@artembilan artembilan added in: core and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels May 4, 2023
@artembilan
Copy link
Member

Sure! What deadline should we aim this for, please?

@artembilan artembilan added this to the 6.2.x milestone May 4, 2023
@snicoll
Copy link
Member Author

snicoll commented May 4, 2023

If we change something, it will be in Spring Framework 6.1 at the earliest. Thanks!

@artembilan artembilan modified the milestones: 6.2.x, 6.2.0-M1 Jun 27, 2023
@artembilan artembilan self-assigned this Jun 27, 2023
artembilan added a commit to artembilan/spring-integration that referenced this issue Jun 27, 2023
Fixes spring-projects#8611

According to the latest Spring Framework requirements related to AOT the
`BeanDefinitionRegistryPostProcessor` must not do anything but only bean registrations

* Extract an `IntegrationConfigurationReport` component
and move `IntegrationProperties` printing over here out from the
`DefaultConfiguringBeanFactoryPostProcessor`
* Remove a `SmartInitializingSingleton` impl from the `DefaultConfiguringBeanFactoryPostProcessor`
garyrussell pushed a commit that referenced this issue Jun 27, 2023
Fixes #8611

According to the latest Spring Framework requirements related to AOT the
`BeanDefinitionRegistryPostProcessor` must not do anything but only bean registrations

* Extract an `IntegrationConfigurationReport` component
and move `IntegrationProperties` printing over here out from the
`DefaultConfiguringBeanFactoryPostProcessor`
* Remove a `SmartInitializingSingleton` impl from the `DefaultConfiguringBeanFactoryPostProcessor`
@artembilan
Copy link
Member

Reopen for MessagingAnnotationPostProcessor part.

@artembilan artembilan reopened this Jun 27, 2023
artembilan added a commit to artembilan/spring-integration that referenced this issue Jun 27, 2023
Fixes spring-projects#8611

According to the latest Spring Framework requirements related to AOT the
`BeanDefinitionRegistryPostProcessor` must not do anything but only bean registrations

* Extract a `MessagingAnnotationBeanPostProcessor` component with a `BeanPostProcessor` logic
from the `MessagingAnnotationPostProcessor` and leave the last one as just
a `BeanDefinitionRegistryPostProcessor` impl
* Fix tests according to a new logic
garyrussell pushed a commit that referenced this issue Jun 28, 2023
Fixes #8611

According to the latest Spring Framework requirements related to AOT the
`BeanDefinitionRegistryPostProcessor` must not do anything but only bean registrations

* Extract a `MessagingAnnotationBeanPostProcessor` component with a `BeanPostProcessor` logic
from the `MessagingAnnotationPostProcessor` and leave the last one as just
a `BeanDefinitionRegistryPostProcessor` impl
* Fix tests according to a new logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment