Skip to content

Introduce enableAnnotations in global IntegrationProperties#11038

Closed
mjd507 wants to merge 1 commit into
spring-projects:mainfrom
mjd507:gh-11024-option3
Closed

Introduce enableAnnotations in global IntegrationProperties#11038
mjd507 wants to merge 1 commit into
spring-projects:mainfrom
mjd507:gh-11024-option3

Conversation

@mjd507
Copy link
Copy Markdown
Contributor

@mjd507 mjd507 commented Jun 2, 2026

the value default to true but can be set to false via:

  1. adding one line config spring.integration.annotations.enable=false into the classpath file spring.integration.properties
  2. defining a new integrationGlobalProperties bean with setEnableAnnotations(false).

Also add a test to demonstrate the performance improvement when turnoff the annotation processing. see: MessagingAnnotationsConfigurationTests.testEnableVersusDisablePerformance

the value default to true but can be set to false via:
1. adding one line config `spring.integration.annotations.enable=false` into the classpath file `spring.integration.properties`
2. defining a new `integrationGlobalProperties` bean with `setEnableAnnotations(false)`.

Also add a test to demonstrate the performance improvement when turnoff the annotation processing. see: `MessagingAnnotationsConfigurationTests.testEnableVersusDisablePerformance`

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
@artembilan
Copy link
Copy Markdown
Member

Hey, @mjd507 !

Thank you very much for all the help and we really appreciate your effort, flexibility and critics.

Sorry to say that, but this is another attempt we have to reject.
Not because you did something wrong, but because I have misled you and everyone around how this should go.

So, after looking into Spring Boot and specifically integration auto-configuration, I have realized that such a global property won't have effect because it is not mapped anyhow in there. So, without introducing such a property into Spring Boot, we cannot have a gain just for Spring Integration.
And that is already not counting the problem you have mentioned about bean resolution in those post-processors.

Thank you again and let's continue brain-storming in the issue!

@artembilan artembilan closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants