Defining an Aspect
Learn how to define an aspect and intercept message calls.
We'll cover the following...
In this lesson, we will define an aspect to intercept all the calls to the business layer and log their output. We will create a number of aspects and place all of them in a separate package.
When we intercept method calls, we have the option to perform tasks before the method is executed as well as afterwards. To define an aspect for a cross-cutting concern, we will perform the following steps:
Define aspect class.
Write methods containing the advice to be executed when method calls are intercepted.
Write pointcut expressions for intercepting method calls. ...
Access this course and 1400+ top-rated courses and projects.