AppConfig
This commit is contained in:
@@ -420,12 +420,9 @@ class AppConfig {
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
} else {
|
||||
f = new File(confDir, "application.yml");
|
||||
if (f.isFile() && f.canRead()) {
|
||||
appConfFile = f.toURI();
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
yaml = true;
|
||||
} else {
|
||||
if (!f.isFile() || !f.canRead()) {
|
||||
f = new File(confDir, "application.yaml");
|
||||
}
|
||||
if (f.isFile() && f.canRead()) {
|
||||
appConfFile = f.toURI();
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
@@ -466,7 +463,6 @@ class AppConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 相对路径
|
||||
File f = new File(new File(home, confDir), "application.xml");
|
||||
if (f.isFile() && f.canRead()) {
|
||||
@@ -474,12 +470,9 @@ class AppConfig {
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
} else {
|
||||
f = new File(new File(home, confDir), "application.yml");
|
||||
if (f.isFile() && f.canRead()) {
|
||||
appConfFile = f.toURI();
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
yaml = true;
|
||||
} else {
|
||||
f = new File(new File(home, confDir), "application.yaml");
|
||||
if (!f.isFile() || !f.canRead()) {
|
||||
f = new File(confDir, "application.yaml");
|
||||
}
|
||||
if (f.isFile() && f.canRead()) {
|
||||
appConfFile = f.toURI();
|
||||
confDir = f.getParentFile().getCanonicalPath();
|
||||
@@ -521,7 +514,6 @@ class AppConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
System.setProperty(RESNAME_APP_CONF_DIR, confDir);
|
||||
String text = Utility.readThenClose(appConfFile.toURL().openStream());
|
||||
AnyValue conf;
|
||||
|
||||
Reference in New Issue
Block a user