new config item support environment config
parent
bfe4f73b49
commit
a936113709
|
@ -336,7 +336,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<!-- <descriptor>src/main/assembly/dist-win32.xml</descriptor>-->
|
<descriptor>src/main/assembly/dist-win32.xml</descriptor>
|
||||||
<descriptor>src/main/assembly/dist-linux.xml</descriptor>
|
<descriptor>src/main/assembly/dist-linux.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -120,15 +120,15 @@ watermark.angle = ${WATERMARK_ANGLE:10}
|
||||||
|
|
||||||
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
||||||
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
||||||
# 备案信息
|
# 备案信息,默认为空
|
||||||
beiAn =
|
beian = ${KK_BEIAN:default}
|
||||||
#禁止上传类型
|
#禁止上传类型
|
||||||
prohibit = exe,dll,dat
|
prohibit = ${KK_PROHIBIT:exe,dll,dat}
|
||||||
#删除密码
|
#删除密码
|
||||||
delete.password = 123456
|
delete.password = ${KK_DELETE_PASSWORD:123456}
|
||||||
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
||||||
delete.source.file = true
|
delete.source.file = ${KK_DELETE_SOURCE_FILE:true}
|
||||||
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
||||||
pdf2jpg.dpi = 144
|
pdf2jpg.dpi = ${KK_PDF2JPG_DPI:144}
|
||||||
#xlsx格式前端解析
|
#xlsx格式前端解析
|
||||||
office.type.web = web
|
office.type.web = ${KK_OFFICE_TYPE_WEB:web}
|
|
@ -42,7 +42,7 @@ public class ConfigConstants {
|
||||||
private static String pdfBookmarkDisable;
|
private static String pdfBookmarkDisable;
|
||||||
private static Boolean fileUploadDisable;
|
private static Boolean fileUploadDisable;
|
||||||
private static String tifPreviewType;
|
private static String tifPreviewType;
|
||||||
private static String beiAn;
|
private static String beian;
|
||||||
private static String[] prohibit = {};
|
private static String[] prohibit = {};
|
||||||
private static String size;
|
private static String size;
|
||||||
private static String password;
|
private static String password;
|
||||||
|
@ -368,15 +368,15 @@ public class ConfigConstants {
|
||||||
ConfigConstants.tifPreviewType = tifPreviewType;
|
ConfigConstants.tifPreviewType = tifPreviewType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getBeiAn() {
|
public static String getBeian() {
|
||||||
return beiAn;
|
return beian;
|
||||||
}
|
}
|
||||||
@Value("${beiAn:无}")
|
@Value("${beian:default}")
|
||||||
public void setBeiAn(String beiAn) {
|
public void setBeian(String beian) {
|
||||||
setBeiAnValue(beiAn);
|
setBeianValue(beian);
|
||||||
}
|
}
|
||||||
public static void setBeiAnValue(String beiAn) {
|
public static void setBeianValue(String beian) {
|
||||||
ConfigConstants.beiAn = beiAn;
|
ConfigConstants.beian = beian;
|
||||||
}
|
}
|
||||||
public static String[] getProhibit() {
|
public static String[] getProhibit() {
|
||||||
return prohibit;
|
return prohibit;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ConfigRefreshComponent {
|
||||||
String tifPreviewType;
|
String tifPreviewType;
|
||||||
String prohibit;
|
String prohibit;
|
||||||
String[] prohibitArray;
|
String[] prohibitArray;
|
||||||
String beiAn;
|
String beian;
|
||||||
String size;
|
String size;
|
||||||
String password;
|
String password;
|
||||||
int pdf2JpgDpi;
|
int pdf2JpgDpi;
|
||||||
|
@ -86,7 +86,7 @@ public class ConfigRefreshComponent {
|
||||||
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
||||||
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
||||||
size = properties.getProperty("spring.servlet.multipart.max-file-size", ConfigConstants.DEFAULT_SIZE);
|
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);
|
prohibit = properties.getProperty("prohibit", ConfigConstants.DEFAULT_PROHIBIT);
|
||||||
password = properties.getProperty("delete.password", ConfigConstants.DEFAULT_PASSWORD);
|
password = properties.getProperty("delete.password", ConfigConstants.DEFAULT_PASSWORD);
|
||||||
pdf2JpgDpi = Integer.parseInt(properties.getProperty("pdf2jpg.dpi", ConfigConstants.DEFAULT_PDF2_JPG_DPI));
|
pdf2JpgDpi = Integer.parseInt(properties.getProperty("pdf2jpg.dpi", ConfigConstants.DEFAULT_PDF2_JPG_DPI));
|
||||||
|
@ -111,7 +111,7 @@ public class ConfigRefreshComponent {
|
||||||
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
||||||
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
||||||
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
||||||
ConfigConstants.setBeiAnValue(beiAn);
|
ConfigConstants.setBeianValue(beian);
|
||||||
ConfigConstants.setSizeValue(size);
|
ConfigConstants.setSizeValue(size);
|
||||||
ConfigConstants.setProhibitValue(prohibitArray);
|
ConfigConstants.setProhibitValue(prohibitArray);
|
||||||
ConfigConstants.setPasswordValue(password);
|
ConfigConstants.setPasswordValue(password);
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class AttributeSetFilter implements Filter {
|
||||||
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
||||||
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
||||||
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
||||||
request.setAttribute("beiAn", ConfigConstants.getBeiAn());
|
request.setAttribute("beian", ConfigConstants.getBeian());
|
||||||
request.setAttribute("size", ConfigConstants.maxSize());
|
request.setAttribute("size", ConfigConstants.maxSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,11 +154,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: grid; place-items: center;">
|
<#if beian?? && beian != "default">
|
||||||
<div>
|
<div style="display: grid; place-items: center;">
|
||||||
<a target="_blank" href="https://beian.miit.gov.cn/">${beiAn}</a>
|
<div>
|
||||||
|
<a target="_blank" href="https://beian.miit.gov.cn/">${beian}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</#if>
|
||||||
<script>
|
<script>
|
||||||
function deleteFile(fileName,password) {
|
function deleteFile(fileName,password) {
|
||||||
if(window.confirm('你确定要删除文件吗?')){
|
if(window.confirm('你确定要删除文件吗?')){
|
||||||
|
@ -209,11 +211,7 @@
|
||||||
+ '(/[\\w_!~*\'()\\.;?:@&=+$,%#-]+)+/?)$';//请求参数结尾- 英文或数字和[]内的各种字符
|
+ '(/[\\w_!~*\'()\\.;?:@&=+$,%#-]+)+/?)$';//请求参数结尾- 英文或数字和[]内的各种字符
|
||||||
var re = new RegExp(strRegex, 'i');//i不区分大小写
|
var re = new RegExp(strRegex, 'i');//i不区分大小写
|
||||||
//将url做uri转码后再匹配,解除请求参数中的中文和空字符影响
|
//将url做uri转码后再匹配,解除请求参数中的中文和空字符影响
|
||||||
if (re.test(encodeURI(url))) {
|
return re.test(encodeURI(url));
|
||||||
return (true);
|
|
||||||
} else {
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
Loading…
Reference in New Issue