Reputation: 16992
I am including a jar which has a class which has component scan enabled for couple of packages which have interceptors. I want to include this jar and use this class but i dont want the interceptor being scanned to be used and want to define my own interceptor which has to be used. How can I ensure that the interceptor which is part of component scan within a class in the jar is excluded?
Upvotes: 0
Views: 321
Reputation: 15105
If you have access to the included source JAR, I would recommend to remove component scanning configuration from the JAR. Component scanning should be set at the top most level to avoid these kind of problems, that is in your "final" WAR or JAR.
That said, you still can :
exclude-filter
configuration to exclude all interceptors of a specific package for exampleIt depends on how much (and what) Spring configuration is included in the JAR.
Upvotes: 1