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


Warning: stream_socket_client(): unable to connect to http://browscap.org/version (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in /home/javasail/public_html/wp-content/plugins/wp-statistics/vendor/browscap/browscap-php/src/phpbrowscap/Browscap.php on line 1366

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/javasail/public_html/wp-content/plugins/wp-statistics/vendor/browscap/browscap-php/src/phpbrowscap/Browscap.php on line 1004