From the course: Spring: Framework in Depth

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Implement AOP advice: After

Implement AOP advice: After

From the course: Spring: Framework in Depth

Start my 1-month free trial

Implement AOP advice: After

- [Instructor] So we've seen executions through advice that occurred before the join point. Let's take a look at the execution that occurs after the join point. So in our logging aspect class, we are going to change the before to an after, but it's not just after. It's after returning, and we'll talk a little bit about that here in a moment, but it's important to note that there's after returning and after throwing. So we will add to this a return value. So this would be returning, and it will be return value, and that is an object that gets returned to this method. So now we have access to both the join point, so the data of the method, plus what the method returned. After we've done our appending of our message let's put a little bit more data in here. So if return value is an instance of a collection, we want to do message dot append, we'll do comma returning. I'm going to bring in this collection here real quick as an…

Contents