Posts

Showing posts from January, 2018

Handling Exception Using Spring's Aspect Oriented Programming

In this post, I will show you how we can handle exceptions using springs aspect-oriented programming. Prerequisites To follow this article you should have JDK 8+   gradle 2.3 +  Your favorite IDE (I used IntelliJ Idea) Folder Structure The folder structure should be as follows  aopexeptionhnadling ├── build.gradle └── src     ├── main     │   └── java     │       └── net     │           └── asifhossain     │               └── aopexceptionhandling     │                   ├── aop     │                   │   └── ExceptionLoggerPointCut.java     │                   ├── AopExampleApp.java     │                   └── service     │                       └── ExceptionalService.java     └── test         └── java             └── net                 └── asifhossain                     └── aopexceptionhandling                         └── AopExampleAppTest.java Creating Gradle Build File Create a file named build.gradle in application with the following content build.gradle Creating the se