parent
56da1a23c2
commit
bb918b742e
@ -0,0 +1,15 @@
|
|||||||
|
## ide
|
||||||
|
**/.idea
|
||||||
|
*.iml
|
||||||
|
rebel.xml
|
||||||
|
|
||||||
|
## backend
|
||||||
|
**/target
|
||||||
|
**/logs
|
||||||
|
|
||||||
|
## front
|
||||||
|
**/*.lock
|
||||||
|
os_del.cmd
|
||||||
|
os_del_doc.cmd
|
||||||
|
.svn
|
||||||
|
derby.log
|
@ -1,26 +1,26 @@
|
|||||||
package org.jeecg.common.desensitization.annotation;
|
package org.jeecg.common.desensitization.annotation;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import org.jeecg.common.desensitization.SensitiveSerialize;
|
import org.jeecg.common.desensitization.SensitiveSerialize;
|
||||||
import org.jeecg.common.desensitization.enums.SensitiveEnum;
|
import org.jeecg.common.desensitization.enums.SensitiveEnum;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在字段上定义 标识字段存储的信息是敏感的
|
* 在字段上定义 标识字段存储的信息是敏感的
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@JacksonAnnotationsInside
|
@JacksonAnnotationsInside
|
||||||
@JsonSerialize(using = SensitiveSerialize.class)
|
@JsonSerialize(using = SensitiveSerialize.class)
|
||||||
public @interface Sensitive {
|
public @interface Sensitive {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不同类型处理不同
|
* 不同类型处理不同
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SensitiveEnum type() default SensitiveEnum.ENCODE;
|
SensitiveEnum type() default SensitiveEnum.ENCODE;
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue