Excel导入配置的IP格式校验

This commit is contained in:
wangxin
2018-10-18 18:05:49 +08:00
parent 71c5af409d
commit 672765d467
5 changed files with 1717 additions and 1448 deletions

View File

@@ -379,7 +379,7 @@ public class ImportExcel {
if (valType == String.class){
String s = String.valueOf(val.toString());
//0.0.0.0表示任意IP的含义
if(StringUtils.endsWith(s, ".0") && !s.equals("0.0.0.0")){
if(StringUtils.endsWith(s, ".0") && !s.endsWith("0.0.0.0")){
val = StringUtils.substringBefore(s, ".0");
}else{
val = String.valueOf(val.toString());