XML(schema)-based Spring AOP

Just like a class is the unit of the object-oriented programming paradigm, aspect is the unit of AOP. Modularity is achieved through aspect in an aspect-oriented programming model. If you wish to choose XML-based configuration for AOP, Spring supports defining aspects using aop namespace tags. You need to define aop namespace tags as follows:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd"
xmlns:aop="http://www.springframework.org/schema/aop">

To differentiate AOP-specific configuration, you need to specify all AOP-related artifacts such as aspects, point-cut, Advice, and so on, within an <aop:config> element inside your Spring context (XML) file. Multiple <aop:config> elements are allowed.

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

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