Intro to AOP

Besides the IoC container, another core module of the Spring framework is its AOP framework. Currently, there are many AOP frameworks on the market implemented for different purposes and based on different technologies, but only the following three open source AOP frameworks have entered the mainstream:

• AspectJ, merged with AspectWerkz since version 5 www.eclipse.org/aspectj/

• JBoss AOP, a subproject of the JBoss appl. server labs.jboss.com/jbossaop/

• Spring AOP, as part of the Spring framework www.springframework.org/

Among them, AspectJ is the most complete and popular AOP framework in the Java community. By comparison, Spring AOP is not a competitor of AspectJ to provide another complete AOP implementation. Its purpose is only to provide an AOP solution that can consistently integrate with its IoC container. In fact, Spring AOP will only handle crosscutting concerns for the beans declared in its IoC container.