Have an Aspect class (@Aspect) which aspect methods are not running. This is because the target object (org.services.myService) is not in the component-scan list. servlet-context.xml:
<context:component-scan base-package="org.controllers" />
<aop:aspectj-autoproxy />
If add the package "org.services" then the pointcut @Pointcut("within(org.services.myService") works.
Issue is can´t change component-scan in the servlet-context.xml:
The project has a separate applicationContext.xml to scan the services folder and there it has a component-scan.
Adding aspectj-autoproxy after each component-scan seems not to work as only finds beans(controllers) scanned in first component-scan
Also, the project will throw an error if I do a component-scan twice on the same folder (JBoss: 2 beans found for autowiring),and other reasons due of the project structure (mixture of XML to allow it running in JBoss and Jetty).
How can I make myService class available to the aspect class without updating context:component-scan ?