Before Advice
Details as well as Examples covering Before Advice.
Sample Examples
Scenario 1: Logging request details using custom annotation
package org.example.logging;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD) // Annotation will be applicable on methods only
@Retention(RetentionPolicy.RUNTIME) // Annotation will be available to the JVM at runtime
public @interface LogRequest {
}

Last updated