Explorar el Código

word替换的问题

huZhiHao hace 5 años
padre
commit
67724311cd
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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());//仅替换参数
             }
         }
         //模板未匹配到区域替换为空