top.cutexingluo.tools.designtools.json.serializer.pkg.sensitive.SensitiveSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xingtools-extra Show documentation
Show all versions of xingtools-extra Show documentation
xingtools 依赖core,附加,也就是基于 SpringBoot 的一些工具或实体类
package top.cutexingluo.tools.designtools.json.serializer.pkg.sensitive;
import top.cutexingluo.tools.designtools.json.serializer.StrJsonStrategy;
/**
* 敏感过滤器
*
* @author XingTian
* @version 1.0.0
* @date 2024/1/1 15:37
* @since 1.0.4
*/
public class SensitiveSerializer implements StrJsonStrategy {
private final StrJsonStrategy desensitize;
public SensitiveSerializer() {
this("");
}
public SensitiveSerializer(String name) {
desensitize = SensitiveStrategy.getStrategy(name).desensitize();
}
@Override
public String toJsonStr(String originStr) {
return desensitize.toJsonStr(originStr);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy