-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6339 from EightMonth/master
还原原有数据脱敏功能并新增@sensitive脱敏注解,不依赖原有数据脱敏功能
- Loading branch information
Showing
5 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...g-boot-base-core/src/main/java/org/jeecg/common/desensitization/annotation/Sensitive.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.jeecg.common.desensitization.annotation; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.jeecg.common.desensitization.SensitiveSerialize; | ||
import org.jeecg.common.desensitization.enums.SensitiveEnum; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* 在字段上定义 标识字段存储的信息是敏感的 | ||
*/ | ||
@Documented | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.FIELD) | ||
@JacksonAnnotationsInside | ||
@JsonSerialize(using = SensitiveSerialize.class) | ||
public @interface Sensitive { | ||
|
||
/** | ||
* 不同类型处理不同 | ||
* @return | ||
*/ | ||
SensitiveEnum type() default SensitiveEnum.ENCODE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters