Skip to content

GH-8654: Fix bean deps for messaging annotations #8657

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

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

artembilan
Copy link
Member

Fixes #8654

Spring Framework has an ability to start dependant beans automatically when we start the current one.

The AbstractMethodAnnotationPostProcessor is missing a bean dependency registration causing errors in target applications when Messaging Annotations configuration is used.

  • Add registerDependentBean() into an AbstractMethodAnnotationPostProcessor when we generate and register a ConsumerEndpointFactoryBean
  • Change one of the ClientManagerBackToBackTests configuration to rely on a @ServiceActivator for Mqttv5PahoMessageHandler bean to ensure that change in the AbstractMethodAnnotationPostProcessor has a proper effect

Cherry-pick to 6.1.x & 6.0.x

Fixes spring-projects#8654

Spring Framework has an ability to start dependant beans automatically
when we start the current one.

The `AbstractMethodAnnotationPostProcessor` is missing a bean dependency
registration causing errors in target applications when Messaging Annotations configuration is used.

* Add `registerDependentBean()` into an `AbstractMethodAnnotationPostProcessor` when we generate
and register a `ConsumerEndpointFactoryBean`
* Change one of the `ClientManagerBackToBackTests` configuration to rely on a `@ServiceActivator`
for `Mqttv5PahoMessageHandler` bean to ensure that change in the `AbstractMethodAnnotationPostProcessor`
has a proper effect

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell garyrussell merged commit af95829 into spring-projects:main Jun 26, 2023
garyrussell pushed a commit that referenced this pull request Jun 26, 2023
Fixes #8654

Spring Framework has an ability to start dependant beans automatically
when we start the current one.

The `AbstractMethodAnnotationPostProcessor` is missing a bean dependency
registration causing errors in target applications when Messaging Annotations configuration is used.

* Add `registerDependentBean()` into an `AbstractMethodAnnotationPostProcessor` when we generate
and register a `ConsumerEndpointFactoryBean`
* Change one of the `ClientManagerBackToBackTests` configuration to rely on a `@ServiceActivator`
for `Mqttv5PahoMessageHandler` bean to ensure that change in the `AbstractMethodAnnotationPostProcessor`
has a proper effect

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell
Copy link
Contributor

...and cherry picked to 6.1.x 8c0ffe3 and 6.0.x 2b724c8

rainboyan pushed a commit to rainboyan/spring-integration that referenced this pull request Nov 24, 2023
…ng-projects#8657)

Fixes spring-projects#8654

Spring Framework has an ability to start dependant beans automatically
when we start the current one.

The `AbstractMethodAnnotationPostProcessor` is missing a bean dependency
registration causing errors in target applications when Messaging Annotations configuration is used.

* Add `registerDependentBean()` into an `AbstractMethodAnnotationPostProcessor` when we generate
and register a `ConsumerEndpointFactoryBean`
* Change one of the `ClientManagerBackToBackTests` configuration to rely on a `@ServiceActivator`
for `Mqttv5PahoMessageHandler` bean to ensure that change in the `AbstractMethodAnnotationPostProcessor`
has a proper effect

**Cherry-pick to `6.1.x` & `6.0.x`**
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.

Fix dependency registration for Messaging annotation parsers
2 participants