Spring AOP vs AspectJ

Spring-AOP Pros It is simpler to use than AspectJ, since you don’t have to use LTW (load-time weaving) or the AspectJ compiler. It uses the Proxy pattern and the Decorator pattern Spring-AOP Cons This is proxy-based AOP, so basically you can only use method-execution joinpoints. Aspects aren’t applied when calling another method within the same … Read more

Spring – @Transactional – What happens in background?

This is a big topic. The Spring reference doc devotes multiple chapters to it. I recommend reading the ones on Aspect-Oriented Programming and Transactions, as Spring’s declarative transaction support uses AOP at its foundation. But at a very high level, Spring creates proxies for classes that declare @Transactional on the class itself or on members. … Read more