Now we are going to see SpringAOP configuration using XML configuration.
The choice to use XML instead of annotations, beyond personal preferences, is the only practicable one in contexts where we use JDK previous to 1.5; it is the first JDK version in which annotations have been introduced.
Therefore, if you want to use Spring with JDK 1.3 or 1.4, the use of schema-based configuration is mandatory.
The only supported instantiation model for XML-defined aspects is the Singleton model.
In order to use XML tags and namespaces instead of annotations, we have to import:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework...