修改脱敏策略

This commit is contained in:
lijiahang
2023-06-30 14:37:52 +08:00
parent 9b9504452f
commit c16874a17b
10 changed files with 152 additions and 192 deletions

View File

@@ -5,7 +5,7 @@ import java.lang.annotation.*;
/**
* 脱敏配置元注解
* <p>
* 标注在字段上则标记脱敏配置
* 标注在字段上则标记该字段执行 http 序列化时脱敏
*
* @author Jiahang Li
* @version 1.0.0
@@ -19,12 +19,12 @@ public @interface Desensitize {
/**
* @return 起始保留字符数
*/
int keepStart() default 0;
int keepStart() default 1;
/**
* @return 结束保留字符数
*/
int keepEnd() default 0;
int keepEnd() default 1;
/**
* @return 脱敏字符

View File

@@ -5,16 +5,15 @@ import java.lang.annotation.*;
/**
* 脱敏配置元注解
* <p>
* 标注在方法上则标记过滤开启
* 多层对象脱敏需要在字段上标注
* 标注在上则标记该类执行序列化时会执行脱敏
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/29 16:58
*/
@Target({ElementType.METHOD, ElementType.FIELD})
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DoDesensitize {
public @interface DesensitizeObject {
}

View File

@@ -9,8 +9,6 @@ package com.orion.ops.framework.common.constant;
*/
public interface ResponseAdviceOrderConst {
int DESENSITIZE = Integer.MIN_VALUE + 2000;
int WRAPPER = Integer.MIN_VALUE + 3000;
int WRAPPER = Integer.MIN_VALUE + 1000;
}