new config item support environment config
This commit is contained in:
@ -42,7 +42,7 @@ public class ConfigConstants {
|
||||
private static String pdfBookmarkDisable;
|
||||
private static Boolean fileUploadDisable;
|
||||
private static String tifPreviewType;
|
||||
private static String beiAn;
|
||||
private static String beian;
|
||||
private static String[] prohibit = {};
|
||||
private static String size;
|
||||
private static String password;
|
||||
@ -368,15 +368,15 @@ public class ConfigConstants {
|
||||
ConfigConstants.tifPreviewType = tifPreviewType;
|
||||
}
|
||||
|
||||
public static String getBeiAn() {
|
||||
return beiAn;
|
||||
public static String getBeian() {
|
||||
return beian;
|
||||
}
|
||||
@Value("${beiAn:无}")
|
||||
public void setBeiAn(String beiAn) {
|
||||
setBeiAnValue(beiAn);
|
||||
@Value("${beian:default}")
|
||||
public void setBeian(String beian) {
|
||||
setBeianValue(beian);
|
||||
}
|
||||
public static void setBeiAnValue(String beiAn) {
|
||||
ConfigConstants.beiAn = beiAn;
|
||||
public static void setBeianValue(String beian) {
|
||||
ConfigConstants.beian = beian;
|
||||
}
|
||||
public static String[] getProhibit() {
|
||||
return prohibit;
|
||||
|
||||
@ -55,7 +55,7 @@ public class ConfigRefreshComponent {
|
||||
String tifPreviewType;
|
||||
String prohibit;
|
||||
String[] prohibitArray;
|
||||
String beiAn;
|
||||
String beian;
|
||||
String size;
|
||||
String password;
|
||||
int pdf2JpgDpi;
|
||||
@ -86,7 +86,7 @@ public class ConfigRefreshComponent {
|
||||
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
||||
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
||||
size = properties.getProperty("spring.servlet.multipart.max-file-size", ConfigConstants.DEFAULT_SIZE);
|
||||
beiAn = properties.getProperty("beiAn", ConfigConstants.DEFAULT_BEIAN);
|
||||
beian = properties.getProperty("beian", ConfigConstants.DEFAULT_BEIAN);
|
||||
prohibit = properties.getProperty("prohibit", ConfigConstants.DEFAULT_PROHIBIT);
|
||||
password = properties.getProperty("delete.password", ConfigConstants.DEFAULT_PASSWORD);
|
||||
pdf2JpgDpi = Integer.parseInt(properties.getProperty("pdf2jpg.dpi", ConfigConstants.DEFAULT_PDF2_JPG_DPI));
|
||||
@ -111,7 +111,7 @@ public class ConfigRefreshComponent {
|
||||
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
||||
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
||||
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
||||
ConfigConstants.setBeiAnValue(beiAn);
|
||||
ConfigConstants.setBeianValue(beian);
|
||||
ConfigConstants.setSizeValue(size);
|
||||
ConfigConstants.setProhibitValue(prohibitArray);
|
||||
ConfigConstants.setPasswordValue(password);
|
||||
|
||||
@ -40,7 +40,7 @@ public class AttributeSetFilter implements Filter {
|
||||
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
||||
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
||||
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
||||
request.setAttribute("beiAn", ConfigConstants.getBeiAn());
|
||||
request.setAttribute("beian", ConfigConstants.getBeian());
|
||||
request.setAttribute("size", ConfigConstants.maxSize());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user