This video introduces the around advice paradigm when writing aspect-oriented code.
- [Narrator] When using Around Advice,…you have some of the most powerful types of aspecting…you can do in my opinion.…The Around Advice allows you to perform…part of your advice prior to the execution…of the joined point,…selected by the point cut,…and then return to the advice…after the joint point completes…and execute the rest of the advice.…As always, with great power comes great responsibility.…And you have to control all code flows…in your advice itself.…If you encounter an exception,…you have to ensure that your advice operates as expected,…and then throws the exception back out…or transforms it in some way.…
In a happy path flow,…you have to return the value from the advice…that you receive from the join point.…So let's show this in action…by adding a timer to our logging method.…So let's navigate to source main Java,…common to common aspecting,…and open up our logging aspect.…So let's jump down here to our advice…and let's modify the type of advice to be an Around Advice.…Now in doing so we need to remove a few of these elements,…
AuthorFrank P Moley III
- Introduction to Spring
- Configuring the ApplicationContext
- Using the Spring expression language
- Configuring proxies
- Autowiring beans
- Using lifecycle methods
- Configuring beans with XML
- Understanding the initialization phases of the bean lifecycle
- Aspect-oriented programming and Spring
Skill Level Intermediate
Learning Spring with Spring Bootwith Frank P Moley III1h 38m Intermediate
1. Spring Overview
2. Configuring the Application Context
3. Annotation-Based Configuration
4. XML-Based Configuration
5. Bean Lifecycle
6. Aspect Oriented Programming
Next steps2m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.