package com.nylc.touyan.auth; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * 标注在 Controller 方法上,要求请求必须携带有效登录态。 * 由 {@link AuthInterceptor} 统一校验,未登录返回 401。 */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RequireAuth { }