Browse Source

word替换的问题

huZhiHao 5 năm trước cách đây
mục cha
commit
865d10df32
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/main/java/platform/common/util/BokeWordUtils.java

+ 2 - 1
src/main/java/platform/common/util/BokeWordUtils.java

@@ -261,7 +261,8 @@ public class BokeWordUtils {
             String key = "${"+textSet.getKey()+"}";
             if(value.indexOf(key)!= -1){
                 // value = textSet.getValue();//全部参数替换
-                value = value.replace(key, textSet.getValue());//仅替换参数
+                if(value != null && textSet != null)
+                    value = value.replace(key, textSet.getValue());//仅替换参数
             }
         }
         //模板未匹配到区域替换为空