Spring AOP with AspectJ XML configuration Example

In spring ,we can define all the pointcut,advice,aspect in the XML file. AOP advice should be used as below in the XML 1)aop:before: It is applied before the actual business logic method gets executed. 2)aop:after: It is applied after the execution of actual business logic method. 3)aop:after-returning: It is applied after the successful execution of […]

Share this article on

After Aspect XML implementation example

create a spring maven project so that we can manage our dependencies in the pom.xml easily. Project structure looks like below Define the pom.xml file as below to include AspectJ jars and spring jars <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">   <modelVersion>4.0.0</modelVersion>     <groupId>Spring</groupId>   <artifactId>SpringAOP</artifactId>   <version>0.0.1-SNAPSHOT</version>   <packaging>jar</packaging>     <name>SpringAOP</name>   […]

Share this article on
< Previous Next >