This video introduces the after advice paradigm when writing aspect-oriented code.
- [Narrator] When using After Advice,…your advice is executed after the join point…that is selected by the point cut.…As there are two possible outcomes of a method call,…you might think that there are two possible ways…to use the after,…but in reality, there's three.…And it'll all make sense here shortly.…The first is after returning,…which is the call executes successfully…and returns normally.…The second is after throwing,…which indicates that the call executed…and threw an exception.…
The final and the one that I use most…is the After Advice,…also known as the After Finally,…which is executed regardless of the…flow of the application.…Each of these has their place,…but the key here is when you need to do work,…after a method is done,…but not necessarily before,…one of these three after advices is what you would use.…Our logging example as it is will work just fine…in this used case.…So let's go ahead and navigate to our code…and source main Java.…
Common to common aspect…will open up our logging aspect itself.…We'll go to our before annotation…
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 33m 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.