AOP: Spring aop vs AspectJ

If you are using Spring framework, it is easy to implement Spring AOP. Ease of implementation comes with some limitations like you can only use aspects with spring managed beans and only methods can be used as pointcuts. Another limitation is that you cannot apply aspects for method calling another in same class. Whereas AspectJ does not have these limitations.

The reason behind this is the way Spring and AspectJ implements AOP. Spring uses runtime weaving whereas AspectJ uses load time weaving. Spring implements proxy based approach. Where it adds a proxy wrapper aound your class, and every call to the class method, has to go through the proxy wrapper.

AspectJ implement load time waving by actually manipulating the bytecode using its compiler while class is loaded to JVM.

References:
http://kamalmeet.com/tag/aop-2/
https://en.wikipedia.org/wiki/AspectJ
http://stackoverflow.com/questions/26325732/spring-aop-with-aspectj-load-time-weaving
http://www.springindepth.com/book/aop-load-time-weaving.html
http://stackoverflow.com/questions/1606559/spring-aop-vs-aspectj