2025-01-27 21:47:33 +08:00

21 lines
563 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.upchina.common.annotation;
import com.upchina.common.constant.AccessRole;
import java.lang.annotation.*;
@Target({ElementType.METHOD}) // 作用在方法上
@Retention(RetentionPolicy.RUNTIME) // 注解会在class字节码文件中存在在运行时可以通过反射获取到
@Documented // 说明该注解将被包含在javadoc中
public @interface Auth {
/**
* 角色:
* 0普通员工
* 1管理员
* 2全部只验证登录状态不验证操作权限
*/
AccessRole role() default AccessRole.LOGIN;
}