posted 12 years ago
Well, I can't help with regex, I don't know regex, nor want to know it. ;)
You can do a couple of approaches. I see that you turned off the default filters which are includes for @Service, @Repository etc.
I do know your order might not make it work, where the first include included your DealManager and therefore the exclude after is overwritten, or maybe the other way around.
One approach I like in this scenario is to create my own set of Annotations and use those in your class and filters where type="Annotations" (Always make sure you include package for your Annotation in the value)
I had three web apps all sharing the same Core project that had Services that in some apps needed and in others didn't. And I couldn't come up with a good filter at that time. Since then and after I left that company, I realized that creating my own Annotation, one for each app, I could put those on those classes and write a clean filter and get exactly the classes I want.
So say I have an app called Moo and another called Bark, I would create an @Moo and a @Bark annotation, I could annotate those annotations with @Service or @Component, then put one or both on Managers that I need in that particular app. Then just
for the Bark application.
That is one possible solution.
Mark