xiangpei
2025-04-18 ccadf9480d4e6a9dcc227a2a0b1f9ae0612e36fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.monkeylessey.annotation;
 
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * 作用于类的属性
 */
@Target({ElementType.FIELD}) // 指定注解的作用目标为字段
@Retention(RetentionPolicy.RUNTIME) // 指定注解在运行时保留
public @interface CipherField {
 
    /**
     * 是否需要加密
     * @return
     */
    boolean needEncode() default true;
 
    /**
     * 是否需要解密
     * @return
     */
    boolean needDecode() default true;
 
}