Skip to content

INT-3376 Support Meta-Annotation Att. Override #1132

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

Closed
wants to merge 2 commits into from

Conversation

garyrussell
Copy link
Contributor

JIRA: https://jira.spring.io/browse/INT-3376

Allow user annotations with Messaging Meta-Annotations
override/supplement attributes set on the meta-Annotation.

*/
public final class MessagingAnnotationUtils {

private MessagingAnnotationUtils() {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to new SF code style it should be abstract class.
However I'd prefer this variant, because abstract class we can extend and invoke new ExtendedUtils().
Shouldn't it be moved to org.springframework.integration.util package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The util package is for utilities used across the project; this is localized to annotations. But I don't mind either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Let it be. Anyway the SF AnnotationUtils in the annotation package.
Let's offer offer this style for *Utils classes and the 120 line length to the code style.
However this private ctor should be in the end of class.

@artembilan
Copy link
Member

LGTM
Although the @MessagingGateway has to support the same

@garyrussell
Copy link
Contributor Author

Pushed; squashed due to major changes; full hierarchy is now supported.

@artembilan
Copy link
Member

Actually, looks good. However maybe we should push to 4.1 till SF will do everything on the matter in the its 4.1. See Juergen's comment: https://jira.spring.io/browse/SPR-11709?focusedCommentId=102153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-102153

@garyrussell garyrussell reopened this Apr 19, 2014
@artembilan
Copy link
Member

Here is a polishing with several fixes, refactirngs and improvements: artembilan@fbfa514
Let me know and I go ahead with merge and docs on the matter.

garyrussell and others added 2 commits April 24, 2014 11:12
JIRA: https://jira.spring.io/browse/INT-3376

Allow user annotations with Messaging Meta-Annotations
override/supplement attributes set on the meta-Annotation.

PR Comments and More

- Do not create a bean definition for the annotation (interface)
when `MessagingGateway` is used as a meta-Annotation.
- For a `MessagingGateway` restore attributes overridden with empty values
- Other PR comments.

Fully support meta-Annotation hierarchy.
* Upgrade JRuby to 1.7.12
* Replace `AnnotationFinder` with moving its methods to `MessagingAnnotationUtils`
* Refactor aggregator classes to use `MessagingAnnotationUtils` to determine the method for annotation
* Fix `IntegrationComponentScanRegistrar` to skip annotation classes
* Fix `MessagingGatewayRegistrar#replaceEmptyOverrides`
* Improve `MessagingAnnotationPostProcessor` to use `ReflectionUtils.USER_DECLARED_METHODS` `MethodFilter`
* Change the `MethodAnnotationPostProcessor` hierarchy to use just list of annotations to process attributes
@artembilan
Copy link
Member

Merging after rebase...

@artembilan
Copy link
Member

Merged

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