自定义注解
@Target(ElementType.METHOD) // 表示注解的使用范围
@Retention(RetentionPolicy.RUNTIME) // 注解的声明周期
@Documented
public @interface CheYuHang {
// 定义前缀
String prefix() default "cache";
}
切面类
/**
* @author cheyuhang on 2021/11/08
*/
@Component
@Aspect
public class LogAspect {
@Around("@annotation(com.baizhi.springboot_jsp_shiro.test.aop.CheYuHang)")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
MethodSignature signature = (MethodSignature