Spring 3.x Load Time Weaving with Aspectj
This is a simple maven project to demonstrate AspectJ Load Time Weaving for a standalone java application with aspects packaged in a different jar
spring - 3.1.0.RELEASE asjectj (rt and weaver) - 1.6.8
Maven project "ltw" is the parent module which has two child modules "aspectj-jar": where the aspect/advice is packaged "spring-app": command line app which uses the aspect/advice defined in "aspectj-jar"
- mvn clean package
- java -javaagent:C:\Users\amit.misra.m2\repository\org\aspectj\aspectjweaver\1.6.8\aspectjweaver-1.6.8.jar
-javaagent:C:\Users\amit.misra.m2\repository\org\springframework\spring-instrument\3.1.0.RELEASE\spring-instrument-3.1.0.RELEASE.jar
-Djava.ext.dirs="C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext";"F:\Users\amit.misra\aspectj\ltw\workspace\ltw\lib"
-jar F:\Users\amit.misra\aspectj\ltw\workspace\ltw\spring-app\target\spring-app-0.0.1-SNAPSHOT.jar - Check the app.log file to see the aspect log messages associated with the around advice