敏感字服兼容
parent
8bdd217c8a
commit
c183c40c81
|
@ -122,7 +122,7 @@ public class SensitivewordFilter {
|
||||||
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
|
Object o = RedisUtil.getInstence().get(SENSIT_WORD_FILTER_KEY);
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
LOGGER.info("getSensitiveWord 敏感字检测服未开启");
|
LOGGER.info("getSensitiveWord 敏感字检测服未开启");
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
String address = (String) o;
|
String address = (String) o;
|
||||||
String[] split = address.split("\\:");
|
String[] split = address.split("\\:");
|
||||||
|
@ -131,13 +131,13 @@ public class SensitivewordFilter {
|
||||||
try {
|
try {
|
||||||
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
||||||
if (rPCClient == null) {
|
if (rPCClient == null) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
boolean result = rPCClient.getClient().isContaintSensitiveWord(userName, type);
|
boolean result = rPCClient.getClient().isContaintSensitiveWord(userName, type);
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.info("getSensitiveWord callback=>",e);
|
LOGGER.info("getSensitiveWord callback=>",e);
|
||||||
return false;
|
return true;
|
||||||
}finally {
|
}finally {
|
||||||
if (rPCClient != null){
|
if (rPCClient != null){
|
||||||
rPCClient.returnObject(serviceKey);
|
rPCClient.returnObject(serviceKey);
|
||||||
|
|
Loading…
Reference in New Issue