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.
Comment From: sbrannen
Effectively what you want is the support provided by org.springframework.context.annotation.ParserStrategyUtils
-- right?
Comment From: mp911de
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.
Comment From: sbrannen
If we introduced something like TypeFilterUtils
that makes the org.springframework.context.annotation.ComponentScanAnnotationParser.typeFiltersFor(AnnotationAttributes)
functionality public, would that meet your needs?
Comment From: mp911de
Totally, it would also not require to make the component scan part public of ComponentScanAnnotationParser.
Comment From: sbrannen
@mp911de, please take a look at the new TypeFilterUtils and let us know if that meets your needs.
Comment From: mp911de
Exactly what we need in Spring Data. Thank you.