From 279e3f24802e48115b1dd103a7ad015ebc574cb2 Mon Sep 17 00:00:00 2001 From: ly Date: Thu, 24 Apr 2025 14:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/annotation/IgnoreAuth.java | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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