Skip to content

Commit 7dc0469

Browse files
author
高雄
committed
新增 页码定位 美化前端 其他功能调整等
1 parent 904af89 commit 7dc0469

48 files changed

Lines changed: 10913 additions & 1232 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Binary file not shown.

‎server/src/main/java/cn/keking/config/ConfigConstants.java‎

Lines changed: 122 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public class ConfigConstants {
1818
public static final String BEAN_NAME = "configConstants";
1919

20+
2021
static {
2122
// PDFBox兼容低版本JDK
2223
System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider");
@@ -90,7 +91,7 @@ public class ConfigConstants {
9091
public static final String DEFAULT_PICTURES_PREVIEW = "true";
9192
public static final String DEFAULT_GET_CORS_FILE = "true";
9293
public static final String DEFAULT_ADD_TASK = "true";
93-
public static final String DEFAULT_AES_KEY = "1234567890123456";
94+
public static final String DEFAULT_AES_KEY = "false";
9495

9596
// 12. UserAgent配置常量
9697
public static final String DEFAULT_USER_AGENT = "false";
@@ -134,6 +135,17 @@ public class ConfigConstants {
134135
// 20. 重定向启用配置常量
135136
public static final String DEFAULT_ENABLE_REDIRECT = "true";
136137

138+
// 22. 异步定时
139+
public static final String DEFAULT_ENABLE_REFRECSHSCHEDULE = "5";
140+
141+
// 23. 其他配置常量
142+
public static final String DEFAULT_SHOW_AES_KEY = "1234567890123456";
143+
public static final String DEFAULT_IS_JAVASCRIPT = "false";
144+
public static final String DEFAULT_XLSX_ALLOW_EDIT = "false";
145+
public static final String DEFAULT_XLSX_SHOW_TOOLBAR = "false";
146+
public static final String DEFAULT_IS_SHOW_KEY= "false";
147+
public static final String DEFAULT_SCRIPT_JS ="false" ;
148+
137149
// ==================================================
138150
// 配置变量定义区(按功能分类,均为静态变量)
139151
// ==================================================
@@ -254,6 +266,18 @@ public class ConfigConstants {
254266
// 21. 重定向启用配置
255267
private static Boolean enableRedirect;
256268

269+
// 22. 异步定时
270+
private static int refreshSchedule;
271+
272+
// 23. 其他配置变量
273+
private static boolean isShowaesKey;
274+
private static boolean isJavaScript;
275+
private static boolean xlsxAllowEdit;
276+
private static boolean xlsxShowtoolbar;
277+
private static boolean isShowKey;
278+
private static boolean scriptJs;
279+
280+
257281

258282
// ==================================================
259283
// 获取方法(按功能分类)
@@ -579,6 +603,36 @@ public static boolean isEnableRedirect() {
579603
return enableRedirect;
580604
}
581605

606+
// 22. 异步定时刷新时间
607+
public static int getTime() {
608+
return 0;
609+
}
610+
611+
// 23. 其他配置获取方法
612+
public static boolean getisShowaesKey() {
613+
return isShowaesKey;
614+
}
615+
616+
public static boolean getisJavaScript() {
617+
return isJavaScript;
618+
}
619+
620+
public static boolean getxlsxAllowEdit() {
621+
return xlsxAllowEdit;
622+
}
623+
624+
public static boolean getxlsxShowtoolbar() {
625+
return xlsxShowtoolbar;
626+
}
627+
628+
public static boolean getisShowKey() {
629+
return isShowKey;
630+
}
631+
632+
public static boolean getscriptJs() {
633+
return scriptJs;
634+
}
635+
582636
// ==================================================
583637
// Setter方法(按功能分类)
584638
// ==================================================
@@ -1036,7 +1090,7 @@ public static void setHomeSearchValue(String homeSearch) {
10361090
}
10371091

10381092
// 12. 权限配置Setter方法
1039-
@Value("${kk.Key:}")
1093+
@Value("${kk.key:false}")
10401094
public void setKey(String key) {
10411095
setKeyValue(key);
10421096
}
@@ -1072,7 +1126,7 @@ public static void setAddTaskValue(boolean addTask) {
10721126
ConfigConstants.addTask = addTask;
10731127
}
10741128

1075-
@Value("${ase.key:1234567890123456}")
1129+
@Value("${aes.key:1234567890123456}")
10761130
public void setaesKey(String aesKey) {
10771131
setaesKeyValue(aesKey);
10781132
}
@@ -1305,4 +1359,69 @@ public void setEnableRedirect(String enableRedirect) {
13051359
public static void setEnableRedirectValue(Boolean enableRedirect) {
13061360
ConfigConstants.enableRedirect = enableRedirect;
13071361
}
1362+
1363+
// 22 异步定时刷新时间
1364+
@Value("${kk.refreshSchedule:5}")
1365+
public void setRefreshSchedule(int refreshSchedule) {
1366+
setRefreshScheduleValue(refreshSchedule);
1367+
}
1368+
1369+
public static void setRefreshScheduleValue(int refreshSchedule) {
1370+
ConfigConstants.refreshSchedule = refreshSchedule;
1371+
}
1372+
1373+
// 23. 其他配置Setter方法
1374+
@Value("${kk.isshowaeskey:false}")
1375+
public void setIsShowaesKey(String isShowaesKey) {
1376+
setIsShowaesKeyValue(Boolean.parseBoolean(isShowaesKey));
1377+
}
1378+
1379+
public static void setIsShowaesKeyValue(boolean isShowaesKey) {
1380+
ConfigConstants.isShowaesKey = isShowaesKey;
1381+
}
1382+
1383+
@Value("${kk.isjavascript:false}")
1384+
public void setIsJavaScript(String isJavaScript) {
1385+
setIsJavaScriptValue(Boolean.parseBoolean(isJavaScript));
1386+
}
1387+
1388+
public static void setIsJavaScriptValue(boolean isJavaScript) {
1389+
ConfigConstants.isJavaScript = isJavaScript;
1390+
}
1391+
1392+
@Value("${kk.xlsxallowedit:false}")
1393+
public void setXlsxAllowEdit(String xlsxAllowEdit) {
1394+
setXlsxAllowEditValue(Boolean.parseBoolean(xlsxAllowEdit));
1395+
}
1396+
1397+
public static void setXlsxAllowEditValue(boolean xlsxAllowEdit) {
1398+
ConfigConstants.xlsxAllowEdit = xlsxAllowEdit;
1399+
}
1400+
1401+
@Value("${kk.xlsxshowtoolbar:false}")
1402+
public void setXlsxShowtoolbar(String xlsxShowtoolbar) {
1403+
setXlsxShowtoolbarValue(Boolean.parseBoolean(xlsxShowtoolbar));
1404+
}
1405+
1406+
public static void setXlsxShowtoolbarValue(boolean xlsxShowtoolbar) {
1407+
ConfigConstants.xlsxShowtoolbar = xlsxShowtoolbar;
1408+
}
1409+
1410+
@Value("${kk.isshowkey:false}")
1411+
public void setisShowKey(String isShowKey) {
1412+
setisShowKeyValue(Boolean.parseBoolean(isShowKey));
1413+
}
1414+
1415+
public static void setisShowKeyValue(boolean isShowKey) {
1416+
ConfigConstants.isShowKey = isShowKey;
1417+
}
1418+
1419+
@Value("${kk.scriptjs:false}")
1420+
public void setscriptJs(String scriptJs) {
1421+
setscriptJsValue(Boolean.parseBoolean(scriptJs));
1422+
}
1423+
1424+
public static void setscriptJsValue(boolean scriptJs) {
1425+
ConfigConstants.scriptJs = scriptJs;
1426+
}
13081427
}

‎server/src/main/java/cn/keking/config/ConfigRefreshComponent.java‎

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ private void updateConfigConstants(Properties properties) {
251251
String homeSearch = properties.getProperty("home.search", ConfigConstants.DEFAULT_HOME_SEARCH);
252252

253253
// 12. 权限配置
254-
String key = properties.getProperty("kk.Key", ConfigConstants.DEFAULT_KEY);
254+
String key = properties.getProperty("kk.key=", ConfigConstants.DEFAULT_KEY);
255255
boolean picturesPreview = Boolean.parseBoolean(properties.getProperty("kk.Picturespreview", ConfigConstants.DEFAULT_PICTURES_PREVIEW));
256256
boolean getCorsFile = Boolean.parseBoolean(properties.getProperty("kk.Getcorsfile", ConfigConstants.DEFAULT_GET_CORS_FILE));
257257
boolean addTask = Boolean.parseBoolean(properties.getProperty("kk.addTask", ConfigConstants.DEFAULT_ADD_TASK));
258-
String aesKey = properties.getProperty("ase.key", ConfigConstants.DEFAULT_AES_KEY);
258+
String aesKey = properties.getProperty("aes.key", ConfigConstants.DEFAULT_AES_KEY);
259259

260260
// 13. UserAgent配置
261261
String userAgent = properties.getProperty("useragent", ConfigConstants.DEFAULT_USER_AGENT);
@@ -299,6 +299,17 @@ private void updateConfigConstants(Properties properties) {
299299
// 21. 重定向启用配置
300300
boolean enableRedirect = Boolean.parseBoolean(properties.getProperty("kk.enable.redirect", ConfigConstants.DEFAULT_ENABLE_REDIRECT));
301301

302+
// 22. 重定向启用配置
303+
int refreshSchedule = Integer.parseInt(properties.getProperty("kk.refreshSchedule ", ConfigConstants.DEFAULT_ENABLE_REFRECSHSCHEDULE).trim());
304+
305+
// 23. 其他配置
306+
boolean isShowaesKey = Boolean.parseBoolean(properties.getProperty("kk.isshowaeskey", ConfigConstants.DEFAULT_SHOW_AES_KEY));
307+
boolean isJavaScript = Boolean.parseBoolean(properties.getProperty("kk.isjavascript", ConfigConstants.DEFAULT_IS_JAVASCRIPT));
308+
boolean xlsxAllowEdit = Boolean.parseBoolean(properties.getProperty("kk.xlsxallowedit", ConfigConstants.DEFAULT_XLSX_ALLOW_EDIT));
309+
boolean xlsxShowtoolbar = Boolean.parseBoolean(properties.getProperty("kk.xlsxshowtoolbar", ConfigConstants.DEFAULT_XLSX_SHOW_TOOLBAR));
310+
boolean isShowKey = Boolean.parseBoolean(properties.getProperty("kk.isshowkey", ConfigConstants.DEFAULT_IS_SHOW_KEY));
311+
boolean scriptJs = Boolean.parseBoolean(properties.getProperty("kk.scriptjs", ConfigConstants.DEFAULT_SCRIPT_JS));
312+
302313
// 设置配置值
303314
// 1. 缓存配置
304315
ConfigConstants.setCacheEnabledValueValue(cacheEnabled);
@@ -385,16 +396,6 @@ private void updateConfigConstants(Properties properties) {
385396
ConfigConstants.setMediaXLFileTimeoutValue(mediaXLFileTimeout);
386397
ConfigConstants.setMediaXXLFileTimeoutValue(mediaXXLFileTimeout);
387398
ConfigConstants.setMediaXXXLFileTimeoutValue(mediaXXXLFileTimeout);
388-
389-
// 19. CAD水印配置
390-
ConfigConstants.setCadwatermarkValue(cadwatermark);
391-
392-
// 20. SSL忽略配置
393-
ConfigConstants.setIgnoreSSLValue(ignoreSSL);
394-
395-
// 21. 重定向启用配置
396-
ConfigConstants.setEnableRedirectValue(enableRedirect);
397-
398399
// 16. PDF DPI配置
399400
ConfigConstants.setPdfDpiEnabledValue(pdfDpiEnabled);
400401
ConfigConstants.setPdfSmallDpiValue(pdfSmallDpi);
@@ -411,6 +412,26 @@ private void updateConfigConstants(Properties properties) {
411412

412413
// 18. PDF线程配置
413414
ConfigConstants.setPdfMaxThreadsValue(pdfMaxThreads);
415+
416+
// 19. CAD水印配置
417+
ConfigConstants.setCadwatermarkValue(cadwatermark);
418+
419+
// 20. SSL忽略配置
420+
ConfigConstants.setIgnoreSSLValue(ignoreSSL);
421+
422+
// 21. 重定向启用配置
423+
ConfigConstants.setEnableRedirectValue(enableRedirect);
424+
425+
// 22. 重定向启用配置
426+
ConfigConstants.setRefreshScheduleValue(refreshSchedule);
427+
428+
// 23. 其他配置
429+
ConfigConstants.setIsShowaesKeyValue(isShowaesKey);
430+
ConfigConstants.setIsJavaScriptValue(isJavaScript);
431+
ConfigConstants.setXlsxAllowEditValue(xlsxAllowEdit);
432+
ConfigConstants.setXlsxShowtoolbarValue(xlsxShowtoolbar);
433+
ConfigConstants.setisShowKeyValue(isShowKey);
434+
ConfigConstants.setscriptJsValue(scriptJs);
414435
}
415436

416437
/**

0 commit comments

Comments
 (0)