重命名 env()
This commit is contained in:
@ -31,7 +31,7 @@ public class ConfigUtils {
|
|||||||
|
|
||||||
// 获取环境变量,如果找不到则返回默认值
|
// 获取环境变量,如果找不到则返回默认值
|
||||||
@SuppressWarnings("SameParameterValue")
|
@SuppressWarnings("SameParameterValue")
|
||||||
private static String env(String key, String def) {
|
private static String getEnvOrDefault(String key, String def) {
|
||||||
String value = System.getenv(key);
|
String value = System.getenv(key);
|
||||||
return value == null ? def : value;
|
return value == null ? def : value;
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ public class ConfigUtils {
|
|||||||
|
|
||||||
public static String getOfficePluginPath() {
|
public static String getOfficePluginPath() {
|
||||||
String userDir = System.getProperty("user.dir");
|
String userDir = System.getProperty("user.dir");
|
||||||
String binFolder = env("KKFILEVIEW_BIN_FOLDER", userDir);
|
String binFolder = getEnvOrDefault("KKFILEVIEW_BIN_FOLDER", userDir);
|
||||||
|
|
||||||
File pluginPath = new File(binFolder);
|
File pluginPath = new File(binFolder);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user