添加日志

back_recharge
jiahuiwen 2021-10-21 16:27:47 +08:00
parent ce1db905a9
commit 1249c87f69
1 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@ public class SensitivewordFilter {
private static Set<String> getSensitiveWord(String txt, int matchType) {
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
if (o == null) {
LOGGER.info("getSensitiveWord 敏感字检测服未开启");
return new HashSet<>(0);
}
String address = (String) o;
@ -92,7 +93,6 @@ public class SensitivewordFilter {
replaceString = getReplaceChars(replaceChar, word.length());
resultTxt = resultTxt.replaceAll(word, replaceString);
}
return resultTxt;
}
@ -121,6 +121,7 @@ public class SensitivewordFilter {
private static boolean isContaintSensitiveWordThrift(String userName, int type){
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
if (o == null) {
LOGGER.info("getSensitiveWord 敏感字检测服未开启");
return false;
}
String address = (String) o;