public class MaskManager extends Object
Modifier and Type | Method and Description |
---|---|
static void |
execWithoutMask(Runnable runnable)
跳过脱敏处理
|
static <T> T |
execWithoutMask(Supplier<T> supplier)
跳过脱敏处理
|
static Map<String,MaskProcessor> |
getProcessorMap() |
static Object |
mask(String type,
Object data) |
static void |
registerMaskProcessor(String type,
MaskProcessor processor)
注册处理器,用户可以注册新的脱敏处理器 或者 覆盖内置的处理器
|
static void |
restoreMask()
恢复脱敏处理
|
static void |
skipMask()
跳过脱敏处理
|
public static void registerMaskProcessor(String type, MaskProcessor processor)
type
- 处理器类型processor
- 脱敏处理器public static Map<String,MaskProcessor> getProcessorMap()
public static <T> T execWithoutMask(Supplier<T> supplier)
public static void execWithoutMask(Runnable runnable)
public static void skipMask()
public static void restoreMask()
Copyright © 2024. All rights reserved.