Commit bb17b5a9 authored by 成亚卿's avatar 成亚卿

修改路径

parent c2ca6a2d
......@@ -107,7 +107,13 @@ public class MainConfig extends JFinalConfig {
public static void loadConfig() {
if (p == null) {
p = PropKit.use("AppConfig.properties").appendIfExists("AppConfig-pro.properties");
// p = PropKit.use("config.properties");
ClassLoader path = Thread.currentThread().getContextClassLoader();
try {
String resources = path.getResource("AppConfig.properties").toURI().getPath().replace("AppConfig.properties","");
p.getProperties().put("resources", resources);
} catch (Exception e) {
e.printStackTrace();
}
ConfirmMiddlewareType(p);
}
}
......@@ -125,7 +131,7 @@ public class MainConfig extends JFinalConfig {
case "dongfangtong":
case "baolande":
case "jindie":
basePath = PathKit.getWebRootPath() + File.separator + "WEB-INF" + File.separator + "classes" + File.separator;
basePath = p.get("resources");
break;
default:
basePath = PathKit.getRootClassPath() + File.separator;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment