mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-14 13:13:47 +08:00
优化 CAD转换功能 新增CAD线程控制和CAD超时限制
This commit is contained in:
@@ -58,6 +58,8 @@ public class ConfigConstants {
|
||||
private static Boolean officeExportBookmarks;
|
||||
private static Boolean officeExportNotes;
|
||||
private static Boolean officeDocumentOpenPasswords;
|
||||
private static String cadTimeout;
|
||||
private static int cadThread;
|
||||
|
||||
public static final String DEFAULT_CACHE_ENABLED = "true";
|
||||
public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd";
|
||||
@@ -89,6 +91,9 @@ public class ConfigConstants {
|
||||
public static final String DEFAULT_DELETE_CAPTCHA = "false";
|
||||
|
||||
|
||||
public static final String DEFAULT_CAD_TIMEOUT = "90";
|
||||
public static final String DEFAULT_CAD_THREAD = "5";
|
||||
|
||||
public static final String DEFAULT_OFFICE_PAQERANQE = "false";
|
||||
public static final String DEFAULT_OFFICE_WATERMARK = "false";
|
||||
public static final String DEFAULT_OFFICE_QUALITY = "80";
|
||||
@@ -469,6 +474,23 @@ public class ConfigConstants {
|
||||
ConfigConstants.deleteSourceFile = deleteSourceFile;
|
||||
}
|
||||
|
||||
public static Boolean getDeleteCaptcha() {
|
||||
return deleteCaptcha;
|
||||
}
|
||||
|
||||
@Value("${delete.captcha:false}")
|
||||
public void setDeleteCaptcha(Boolean deleteCaptcha) {
|
||||
setDeleteCaptchaValue(deleteCaptcha);
|
||||
}
|
||||
|
||||
public static void setDeleteCaptchaValue(Boolean deleteCaptcha) {
|
||||
ConfigConstants.deleteCaptcha = deleteCaptcha;
|
||||
}
|
||||
|
||||
/**
|
||||
* 以下为cad转换模块设置
|
||||
*/
|
||||
|
||||
public static String getCadPreviewType() {
|
||||
return cadPreviewType;
|
||||
}
|
||||
@@ -482,17 +504,32 @@ public class ConfigConstants {
|
||||
ConfigConstants.cadPreviewType = cadPreviewType;
|
||||
}
|
||||
|
||||
public static Boolean getDeleteCaptcha() {
|
||||
return deleteCaptcha;
|
||||
|
||||
public static String getCadTimeout() {
|
||||
return cadTimeout;
|
||||
}
|
||||
|
||||
@Value("${delete.captcha:false}")
|
||||
public void setDeleteCaptcha(Boolean deleteCaptcha) {
|
||||
setDeleteCaptchaValue(deleteCaptcha);
|
||||
@Value("${cad.timeout:90}")
|
||||
public void setCadTimeout(String cadTimeout) {
|
||||
setCadTimeoutValue(cadTimeout);
|
||||
}
|
||||
|
||||
public static void setDeleteCaptchaValue(Boolean deleteCaptcha) {
|
||||
ConfigConstants.deleteCaptcha = deleteCaptcha;
|
||||
public static void setCadTimeoutValue(String cadTimeout) {
|
||||
ConfigConstants.cadTimeout = cadTimeout;
|
||||
}
|
||||
|
||||
|
||||
public static int getCadThread() {
|
||||
return cadThread;
|
||||
}
|
||||
|
||||
@Value("${cad.thread:5}")
|
||||
public void setCadThread(int cadthread) {
|
||||
setCadThreadValue(cadthread);
|
||||
}
|
||||
|
||||
public static void setCadThreadValue(int cadthread) {
|
||||
ConfigConstants.cadThread = cadthread;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user