yanghui
2022-10-27 c7a1a16c8d22b64f9025e800ebaf89b19b530228
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package com.dg.core.annotation;
 
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * 在Controller的方法参数中使用此注解,该方法在映射时会注入当前登录的User对象
 */
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface CurrentUser {
}