AOP Alliance is a joint open source venture having the participation of many active AOP communities, including Spring. The aim of AOP Alliance is to avoid the duplicate implementations of the same AOP features among AOP engineering groups. We can avoid rebuilding the existing AOP Alliance components by reusing them. AOP Alliance also ensures interoperability between other AOP implementations by providing a root AOP. We should use the reusable features of AOP Alliance in order to build powerful aspect-oriented environment (AOE) implementations.
As shown in the following, create a simple Spring Maven project and classes as given in the project explorer and configure the XML file for the AspectJ, Bean Creation, and Aspect Mappings. We have added the aop:aspectj-autoproxy
element to the config XML file in order to enable the AspectJ support:
Create the BookAspect
, BookAnnotationAspect
, BookAfterAspect
, and BookAroundAspect
classes. Take a look at...