I am using Spring 4.16 with Java annotations and I want to do something like:
@Configuration @ComponentScan(basePackages = "com.example.business", includeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = ServiceComponent.class)) @ComponentScan(basePackages = "com.example.business.framework") public class ServicesBaseConfiguration { }
Obviusly, it does not compile. But I hope you understand my point. I want to have several ComponentScans with various packages and filters.
I cannot unify both components of ComponentsScan because it will not create any component from the framework, but those that are annotated with ServiceComponent, am I right?
Do you know how I can solve this? thanks in advance
source share