in my application i am using AOP on the Controller and DAO Layer - it works properly.
However, on my service layer, which is created inside a @Configuration class (as a bean), it does not work.
So my problem is that the pointcuts and advices for Controller and DAO layer work - but not for the Service Layer.
Reading on the internet - i found out that i should add @EnableAspectJAutoProxy annotation - but it still does not work with this.
Side NOTE:
@Bean("nameOfResolver")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE, proxyMode = ScopedProxyMode.TARGET_CLASS)
The class that does not work is like this
public class ResolveImpl implements Resolve {
private static final Logger LOGGER = LoggerFactory.getLogger(ResolveImpl.class);
@CustomAnnotation(user = "user")
public TestClass createTestClass(String user) {
......
}
}
I have this in my bean which resolves which bean should be returned.
Thanks a lot for your help