Class LoggingAspect

java.lang.Object
edu.ucsb.cs156.example.aop.LoggingAspect

@Component public class LoggingAspect extends Object
This class is an Aspect that logs all invocations of controller methods that are annotated with @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, or @PatchMapping. For more information on Aspect Oriented Programming (AOP) and AspectJ, including what a JoinPoint is, refer to https://www.baeldung.com/aspectj
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    logControllers(org.aspectj.lang.JoinPoint joinPoint)
    This method is called before any controller method that is annotated with @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, or @PatchMapping.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LoggingAspect

      public LoggingAspect()
  • Method Details

    • logControllers

      public void logControllers(org.aspectj.lang.JoinPoint joinPoint)
      This method is called before any controller method that is annotated with @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, or @PatchMapping.
      Parameters:
      joinPoint - the join point (injected by Spring framework)