添加日志
parent
ce1db905a9
commit
1249c87f69
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue