diff --git a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordAllow.java b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordAllow.java index 135f170..1d61d61 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordAllow.java +++ b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordAllow.java @@ -15,6 +15,8 @@ public class MyDdWordAllow implements IWordAllow { list.add("五星红旗"); list.add("天安门"); + + return list; } diff --git a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordDeny.java b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordDeny.java index 82b28b1..1285f96 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordDeny.java +++ b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/MyDdWordDeny.java @@ -20,6 +20,8 @@ public class MyDdWordDeny implements IWordDeny { list.add(denyWord); } + + return list; } } \ No newline at end of file diff --git a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/SensitiveWordService.java b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/SensitiveWordService.java index c75aca4..e9f52d0 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/SensitiveWordService.java +++ b/luoo_comment/src/main/java/com/luoo/comment/sensitiveword/SensitiveWordService.java @@ -16,6 +16,8 @@ public class SensitiveWordService { *
* 说明:重新初始化不影响旧的方法使用。初始化完成后,会以新的为准。 */ + + public void refresh() { // 每次数据库的信息发生变化之后,首先调用更新数据库敏感词库的方法,然后调用这个方法。 sensitiveWordBs.init();