From 4cded15f644b1a4e2d7391b083ea9be93140f026 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期二, 06 四月 2021 15:28:40 +0800 Subject: [PATCH] bug fixed:脱敏失效修复 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java index a83d595..49297a8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java @@ -11,6 +11,7 @@ import org.apache.ibatis.reflection.MetaObject; import org.apache.ibatis.reflection.SystemMetaObject; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import java.lang.reflect.Field; @@ -29,6 +30,7 @@ @Slf4j @ConditionalOnProperty(value = "domain.sensitive", havingValue = "true") @Component +@Order(120) public class SensitiveInterceptor implements Interceptor { @SuppressWarnings("unchecked") @Override @@ -64,7 +66,6 @@ // 获取对应的脱敏策略 并进行脱敏 SensitiveStrategy type = annotation.strategy(); Object o = type.getDesensitizer().apply((String) value); - log.debug("脱敏信息:{}->{}" , value, o.toString() ); // 把脱敏后的值塞回去 metaObject.setValue(name, o); } -- Gitblit v1.7.1