XML-based aspect configuration

The following are the steps that need to be followed to develop an XML-based aspect:

  1. Select the cross-cutting concern to be implemented.
  2. Write the aspect to fulfill the requirement of the cross-cutting concern.
  3. Register the aspect as a bean in the Spring context.
  4. Write the aspect configuration as follows:
    • Add an AOP namespace in XML
    • Add aspect configuration that has pointcut expressions and advices
    • Register the bean on which the aspect can be applied

From the available join points, the developers need to decide which to track, and then need to write pointcuts using expressions to target them. To write such pointcuts, the Spring framework uses AspectJ's pointcut expression language. We can write pointcuts with the help of the following designators in the expression:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.98.71