新功能点:支持base url配置(主要用于nginx反向代理等)

This commit is contained in:
陈精华
2019-10-17 10:59:38 +08:00
committed by kl
parent 8c2fb2bdee
commit 1060bdd00f
4 changed files with 33 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ public class ConfigConstants {
private static String ftpPassword;
private static String ftpControlEncoding;
private static String fileDir = OfficeUtils.getHomePath() + File.separator + "file" + File.separator;
private static String baseUrl;
public static Boolean isCacheEnabled() {
return cacheEnabled;
@@ -92,6 +93,15 @@ public class ConfigConstants {
return fileDir;
}
public static String getBaseUrl() {
return baseUrl;
}
public static void setBaseUrl(String baseUrl) {
// 不以'/'结尾的,加上'/'
ConfigConstants.baseUrl = baseUrl.concat("/");
}
@Value("${file.dir:default}")
public void setFileDir(String fileDir) {
if (!"default".equals(fileDir)) {