Reputation: 842
I have a project say A[In Maven] which has dependency on project B[In Maven]. Now project B got some spring @Configuration[db configuration ] files which gets up when i build and deploy my project A but due to some config properties which I don't have in my project A it shows some error. So how can I exclude that configuration files in project A while using other dependency in project B.
Upvotes: 4
Views: 7520
Reputation: 57381
You can add excludeFilters in your component scan to skip the class
@ComponentScan(value = {'your.package.here'}, excludeFilters = @Filter(ConfigurationToIgnore.class))
Upvotes: 8