修正Ip Spoofing配置导入模板'direction'字段默认值批注;修改配置导入域名字段校验;修复配置导入属性验证发生异常后无提示信息问题(王鑫)
(cherry picked from commit 38f563ceee07bfdaa4d94cc5ca6f712edb894d40)
This commit is contained in:
@@ -963,8 +963,10 @@ public class BaseController {
|
||||
BlockingQueue<BaseIpCfg> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckIpFormatThread t=new CheckIpFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckIpFormatThread t=new CheckIpFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
t.setAsnNoMaps(asnNos);
|
||||
t.setAsnGroupInfos(asnGroupInfos);
|
||||
futures.add(service.submit(t));
|
||||
@@ -978,13 +980,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
_msg.append(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkIpCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
@@ -1005,8 +1020,10 @@ public class BaseController {
|
||||
BlockingQueue<BaseStringCfg<?>> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckStringFormatThread t=new CheckStringFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckStringFormatThread t=new CheckStringFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
futures.add(service.submit(t));
|
||||
}
|
||||
service.shutdown();
|
||||
@@ -1018,13 +1035,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
_msg.append(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkStringCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
@@ -1045,8 +1075,10 @@ public class BaseController {
|
||||
BlockingQueue<ComplexkeywordCfg> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckComplexStringFormatThread t=new CheckComplexStringFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckComplexStringFormatThread t=new CheckComplexStringFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
futures.add(service.submit(t));
|
||||
}
|
||||
service.shutdown();
|
||||
@@ -1058,13 +1090,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
_msg.append(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkComplexStringCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
@@ -1085,8 +1130,10 @@ public class BaseController {
|
||||
BlockingQueue<DnsResStrategy> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckDnsResStrategyFormatThread t=new CheckDnsResStrategyFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckDnsResStrategyFormatThread t=new CheckDnsResStrategyFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
futures.add(service.submit(t));
|
||||
}
|
||||
service.shutdown();
|
||||
@@ -1098,13 +1145,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
_msg.append(msg);
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkDnsResStrategyCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
@@ -1127,8 +1187,10 @@ public class BaseController {
|
||||
BlockingQueue<AppComplexFeatureCfg> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckAppFeatureComplexStringFormatThread t = new CheckAppFeatureComplexStringFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckAppFeatureComplexStringFormatThread t=new CheckAppFeatureComplexStringFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
futures.add(service.submit(t));
|
||||
}
|
||||
service.shutdown();
|
||||
@@ -1140,13 +1202,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
_msg.append(msg);
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkAppComplexFeatureStringCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
@@ -1168,10 +1243,11 @@ public class BaseController {
|
||||
BlockingQueue<AppTopicDomainCfg> queue=new ArrayBlockingQueue<>(list.size());
|
||||
ExecutorService service=Executors.newFixedThreadPool(Constants.MULITY_THREAD_SIZE);
|
||||
List<Future<String>> futures=new ArrayList<>();
|
||||
|
||||
Properties props=this.getMsgProp();
|
||||
for(int i=0;i<Constants.MULITY_THREAD_SIZE;i++) {
|
||||
CheckTopicWebsiteFormatThread t=new CheckTopicWebsiteFormatThread(serviceDict,regionDict, this.getMsgProp(), list, queue);
|
||||
CheckTopicWebsiteFormatThread t=new CheckTopicWebsiteFormatThread(serviceDict,regionDict, props, list, queue);
|
||||
futures.add(service.submit(t));
|
||||
|
||||
}
|
||||
service.shutdown();
|
||||
while(!service.isTerminated()) {
|
||||
@@ -1182,13 +1258,26 @@ public class BaseController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
boolean valideteError=false;
|
||||
for(Future<String> future:futures) {
|
||||
String msg = future.get();
|
||||
if(StringUtils.isNotBlank(msg)) {
|
||||
if(msg.equals("validate_error")) {
|
||||
valideteError=true;
|
||||
}else if(msg.endsWith("validate_error")) {
|
||||
_msg.append(msg.substring(0, msg.length()-1-"validate_error".length()));
|
||||
valideteError=true;
|
||||
}else {
|
||||
_msg.append(msg);
|
||||
}
|
||||
//throw new ServiceException(msg);
|
||||
_msg.append(msg);
|
||||
|
||||
}
|
||||
}
|
||||
if(valideteError) {
|
||||
_msg.append(props.getProperty("validate_error", "Unexpected error occurred while validating"));
|
||||
}
|
||||
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("checkTopicWebsiteCfgMulity finish,cost:"+(end-start)+",size:"+queue.size());
|
||||
return queue;
|
||||
|
||||
Reference in New Issue
Block a user