Quantcast
Viewing latest article 1
Browse Latest Browse All 3

Answer by gabuzo for Spring AOP: Annotation on any method called x not working

Spring AOP Proxies and aspectJ had some differences mainly:

  • Spring AOP only works on public methods.
  • Spring AOP does not work for self invocations.

You can have a look to sections 8.4 & 8.5 of Spring's Documentation for more information.

Currently you have two solutions:

  1. refactor your code to remove the need for self invocation
  2. use AspectJ rather than Spring AOP proxies either at compile time or load time.

Viewing latest article 1
Browse Latest Browse All 3

Trending Articles