This video introduces the before advice paradigm when writing aspect-oriented code.
- [Instructor] When using Before Advice,…your advice is executed prior to the JoinPoint…that is selected by the PointCut.…This is a great opportunity for call stack metrics,…security audits, and other behavior…that is not impacted by the outcome of the call,…only the fact that a method was actually called.…We will start our discussion with the advice first,…so let's navigate into src, main, java,…com.lynda.common aspect,…and open up our LoggingAspect itself.…
One of the first things that we need to do…in order to log messages is have a handle to a Logger,…so we'll go ahead and do that…by creating a private static final instance of Logger,…and we're going to use the one from org.slf4j.…By convention, we will call it LOGGER, all caps,…and we will set that equal…to the LoggerFactory from org.slf4j,….getLogger,…and we will pass it our LoggingAspect class name.…
So, now that we have the Logger itself,…let's go ahead and write a method…to actually leverage it.…We will create a public void method called logMethodCall,…
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.