main
黄海 9 months ago
parent 35c2790043
commit b51102f632

@ -135,9 +135,12 @@ public class BaseApplication extends JFinalConfig {
//遍历sql目录下所有的sql文件
File sqlDir;
//String basePath = PathKit.getRootClassPath();
String basePath = BaseApplication.class.getClassLoader().getResource(".").getPath();
//System.out.println("发现basePath=" + basePath);
String basePath = PropKit.get("rootPath");
// 创建File对象
File directory = new File(basePath);
if(!directory.exists()){
basePath = PathKit.getRootClassPath();
}
sqlDir = new File(basePath + "/Sql");
File[] sqlFiles = sqlDir.listFiles();
for (File sqlFile : sqlFiles != null ? sqlFiles : new File[0]) {

@ -5,6 +5,9 @@ SECRET: ZXZnZWVr5b+r5LmQ5L2g55qE5Ye66KGM
# 生成Token的密码
CookieMd5SingPwd: DsideaL4r5t6y7u
# 系统的启动路径
rootPath : /usr/local/dsBase/classes
mysql:
# 数据库信息
driverClassName: com.mysql.cj.jdbc.Driver

Loading…
Cancel
Save