REM:
1.修改迪普设备拆分IP的存储格式
This commit is contained in:
chenlinghy 2021-01-18 14:38:30 +08:00
parent c3a3b90e50
commit 89a1d7f297
1 changed files with 8 additions and 2 deletions

View File

@ -255,10 +255,16 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
// 将业务Ip根据IP地址类型进行拆分 // 将业务Ip根据IP地址类型进行拆分
for (String k : StringUtils.deleteWhitespace(v.getServiceIp()).split(DisposeConfigValue.SPLIT_CHAR)) { for (String k : StringUtils.deleteWhitespace(v.getServiceIp()).split(DisposeConfigValue.SPLIT_CHAR)) {
String ipValue = k.replaceAll("\\d+_", "");
if (!k.contains(":")) { if (!k.contains(":")) {
ipV4.add(ipV4Idx++ + "_" + k); if (Pattern.matches(ConstValue.ipAddrSegmentReg(), ipValue)) {
ipV4.add(ipV4Idx++ + "_" + ipValue);
}
} else { } else {
ipV6.add(ipV6Idx++ + "_" + k); if (Pattern.matches(ConstValue.ipAddrSegmentReg(), ipValue)) {
ipV6.add(ipV6Idx++ + "_" + ipValue);
}
} }
} }