Skip to content
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

Introduce TypeFilterUtils for processing @ComponentScan.Filter #27553

Closed
mp911de opened this issue Oct 13, 2021 · 6 comments
Closed

Introduce TypeFilterUtils for processing @ComponentScan.Filter #27553

mp911de opened this issue Oct 13, 2021 · 6 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Oct 13, 2021

Spring Data leverages ComponentScan.filter for repository scanning while implementing the filter annotation parser itself.

That arrangement has lead to differences in implementations such as the lack for *Aware callbacks (see spring-projects/spring-data-commons#2481). It would be good to be able to reuse ComponentScanAnnotationParser to ensure consistency for @Filter support across projects leveraging ComponentScan-like functionality.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 13, 2021
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Oct 13, 2021
@sbrannen
Copy link
Member

Effectively what you want is the support provided by org.springframework.context.annotation.ParserStrategyUtils -- right?

@mp911de
Copy link
Member Author

mp911de commented Oct 13, 2021

ParserStrategyUtils is the last mile. Our code is at AnnotationRepositoryConfigurationSource. typeFiltersFor(…). Having something that is able to parse and return typeFilters would be already sufficient.

@sbrannen
Copy link
Member

If we introduced something like TypeFilterUtils that makes the org.springframework.context.annotation.ComponentScanAnnotationParser.typeFiltersFor(AnnotationAttributes) functionality public, would that meet your needs?

@sbrannen sbrannen added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 13, 2021
@sbrannen sbrannen self-assigned this Oct 13, 2021
@sbrannen sbrannen added this to the 5.3.12 milestone Oct 13, 2021
@mp911de
Copy link
Member Author

mp911de commented Oct 13, 2021

Totally, it would also not require to make the component scan part public of ComponentScanAnnotationParser.

@jhoeller jhoeller modified the milestones: 5.3.12, 5.3.13 Oct 18, 2021
@sbrannen sbrannen changed the title Allow external reuse of ComponentScanAnnotationParser Introduce TypeFilterUtils for processing @ComponentScan.Filter Oct 21, 2021
@sbrannen
Copy link
Member

@mp911de, please take a look at the new TypeFilterUtils and let us know if that meets your needs.

@mp911de
Copy link
Member Author

mp911de commented Oct 21, 2021

Exactly what we need in Spring Data. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants