master
axzsd 2023-03-11 23:16:40 +08:00
parent c744698877
commit c9e2e562b2
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ public class JsonPathDesensitizeExecutor extends DesensitizeExecutorAdapter {
return gson.fromJson(jsonTree.toString(),obj.getClass());
}
private void maskSensitiveWords(JsonElement originElement,Collection<String> ignoreMaskWords) {
protected void maskSensitiveWords(JsonElement originElement,Collection<String> ignoreMaskWords) {
Set<String> needMaskWords = maskWordsMap.keySet();
if (originElement.isJsonArray()) {
JsonArray jsonArray = originElement.getAsJsonArray();
@ -57,7 +57,7 @@ public class JsonPathDesensitizeExecutor extends DesensitizeExecutorAdapter {
}
}
private Collection<String> matchIgnoreFields(Object obj) {
protected Collection<String> matchIgnoreFields(Object obj) {
Collection<String> ignoreMaskFields = new HashSet<>();
for (String ignoreJpe : ignoreJsonPathExpression) {
Object field = JsonPath.read(gson.toJsonTree(obj).toString(),ignoreJpe);