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;
|
|
}
|