Support disabling messaging annotations processing#11039
Conversation
artembilan
left a comment
There was a problem hiding this comment.
Please, don't touch GatewayProxyInstantiationPostProcessor and IntegrationComponentScanRegistrar.
They are for components scanning, for those which represents some entries on classpath.
Their purpose similar to the @ComponentScan in Spring Framework.
What we are trying to prevent here is annotations on methods in beans.
So, our goal would be similar to opting-in into something like @EnableMvc, but that does not mean that when we don't opt-in, the @ComponentScan should not work, too.
I agree that something like @EnableIntegrationMethodAnnotations would sound better for you to not look into the IntegrationComponentScanRegistrar, but I don't think we need to go such a fine-grain naming while we can just document this new property and future annotation properly.
Please, make a respective change and we will come back to you shortly for the further review.
Thanks
By adding `spring.integration.annotations.enable=false` into the environment property or application.properties. When disabled, the following post processors are not registered in the application context: - `MessagingAnnotationPostProcessor` - `MessagingAnnotationBeanPostProcessor` Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
artembilan
left a comment
There was a problem hiding this comment.
Please, consider to mention this property in the respective annotations chapter and in the what’s new one, too.
thanks
Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
mjd507
left a comment
There was a problem hiding this comment.
The scope is now much more precise and focused, thanks for the feedback.
Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
artembilan
left a comment
There was a problem hiding this comment.
LGTM!
Will merge in the morning from laptop.
Thank you!
Signed-off-by: Artem Bilan <artem.bilan@broadcom.com>
By adding
spring.integration.annotations.enable=falseinto the environment property or application.properties.When disabled, the following post processors are not registered in the application context:
MessagingAnnotationPostProcessorMessagingAnnotationBeanPostProcessor