处理国际化文件频繁加载导致java.net.SocketException: Too many open files的问题
This commit is contained in:
@@ -240,7 +240,7 @@ public class InterceptController extends CommonController{
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
Map<String, String> noExportMap=new HashMap<String, String>();
|
||||
Map<String, String> replaceExportMap=new HashMap<String, String>();
|
||||
|
||||
Properties prop = getMsgProp();
|
||||
List<CfgIndexInfo> ipLists=new ArrayList<CfgIndexInfo>();
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
@@ -263,7 +263,6 @@ public class InterceptController extends CommonController{
|
||||
}
|
||||
for (CfgIndexInfo str : ipLists) {
|
||||
if(!StringUtil.isEmpty(str.getUserRegion5())){
|
||||
Properties prop = getMsgProp();
|
||||
String cs= DictUtils.getDictLabel("INTERCEPT_DOMAIN_INTENSITY", str.getUserRegion5());
|
||||
str.setUserRegion5(prop.getProperty(cs));
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -103,22 +104,23 @@ public class PxyObjKeyringController extends BaseController {
|
||||
File file = null;
|
||||
boolean validFlag=true;
|
||||
try {
|
||||
Properties msgProp = this.getMsgProp();
|
||||
boolean publicKeyFileflag=validCertFileContent(publicKeyFileI,"-incert");
|
||||
boolean privateKeyFileflag=validCertFileContent(privateKeyFileI,"-inkey");
|
||||
if(!publicKeyFileflag && !privateKeyFileflag){
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
logger.error(publicKeyFileI.getOriginalFilename()+" and "+privateKeyFileI.getOriginalFilename()+" file non certificate file format ");
|
||||
throw new MultiPartNewException(
|
||||
this.getMsgProp().getProperty("certificate_error")
|
||||
msgProp.getProperty("certificate_error")
|
||||
);
|
||||
}else if(!publicKeyFileflag){
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
logger.error(publicKeyFileI.getOriginalFilename()+" file non public key file format ");
|
||||
throw new MultiPartNewException(this.getMsgProp().getProperty("public_file_error"));
|
||||
throw new MultiPartNewException(msgProp.getProperty("public_file_error"));
|
||||
}else if(!privateKeyFileflag){
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
logger.error(privateKeyFileI.getOriginalFilename()+" file non private key file format ");
|
||||
throw new MultiPartNewException(this.getMsgProp().getProperty("private_file_error"));
|
||||
throw new MultiPartNewException(msgProp.getProperty("private_file_error"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
validFlag=false;
|
||||
|
||||
Reference in New Issue
Block a user