Skip to content

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

Closed
garyrussell wants to merge 2 commits into
spring-projects:masterfrom
garyrussell:INT-3376
Closed

garyrussell wants to merge 2 commits into
spring-projects:masterfrom
garyrussell:INT-3376

Conversation

@garyrussell

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

LGTM
Although the @MessagingGateway has to support the same

@garyrussell

Copy link
Copy Markdown
Contributor Author

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

@artembilan

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Merging after rebase...

@artembilan

Copy link
Copy Markdown
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