diff --git a/src/main/java/com/annotation/IgnoreAuth.java b/src/main/java/com/annotation/IgnoreAuth.java index 7c3cc55..d620996 100644 --- a/src/main/java/com/annotation/IgnoreAuth.java +++ b/src/main/java/com/annotation/IgnoreAuth.java @@ -1,13 +1,18 @@ +// 定义该文件所在的包路径 package com.annotation; +// 导入注解相关的包 import java.lang.annotation.*; -/** - * 忽略Token验证 - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented +// 忽略Token验证的注解 +// 被此注解标记的方法将跳过Token验证检查 +@Target(ElementType.METHOD) +// 指定该注解只能用于方法上 +@Retention(RetentionPolicy.RUNTIME) +// 指定该注解在运行时保留,可以通过反射读取 +@Documented +// 表示该注解应该被包含在JavaDoc中 public @interface IgnoreAuth { - -} + // 这是一个标记注解,不包含任何属性 + // 仅用于标识需要跳过Token验证的方法 +} \ No newline at end of file