|
|
|
@ -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]) {
|
|
|
|
|