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.

Challenge: Building your own aspect

Challenge: Building your own aspect

From the course: Spring: Framework in Depth

Start my 1-month free trial

Challenge: Building your own aspect

(pleasant electronic music) - [Instructor] So now it's time for a challenge exercise and you're going to get to write your own aspect. Let's take a look at the challenge as a whole. So what I want you to do is create a counter, and that counter will count all method calls so all calls to an individual method. I want you to report on them by method name and then apply the counter at method level, and you can apply it to any number of methods you pick, one of your methods, all of your methods, that's totally up to you, but what I want you to do is make sure that you're counting each time the method is called in the application and then report it, so name, colon, number of times it's been called, and continually output that every time it's called. Give you a few minutes, and I'll be back with you.

Contents