Spring-Spring AOPNo Comments

In this tutorial, we show you how using AspectJ with Spring AOP into XML based configuration.

 

Review  customerBo interface  with few methods, later you will learn how to intercept it via AspectJ in XML file.

1. AspectJ <aop:before> = @Before

AspectJ @Before example.

Equivalent functionality in XML, with <aop:before>.

2. AspectJ <aop:after> = @After

AspectJ @After example.

Equivalent functionality in XML, with <aop:after>.

3. AspectJ <aop:after-returning> = @AfterReturning

AspectJ @AfterReturning example.

Equivalent functionality in XML, with <aop:after-returning>.

 

4. AspectJ <aop:after-throwing> = @AfterReturning

AspectJ @AfterReturning example.

Equivalent functionality in XML, with <aop:after-throwing>.

5. AspectJ <aop:after-around> = @Around

AspectJ @Around example.

Equivalent functionality in XML, with <aop:after-around>.

Full XML example

See complete AspectJ XML based configuration file.

 

 

 


Be the first to post a comment.

Add a comment