Merge pull request #120 from hxy1991/master

Fix #119
This commit is contained in:
Keep 2018-10-10 13:58:41 +08:00 committed by GitHub
commit c7715eecd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,8 +178,9 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
* @param sqlFile sql
* @throws Exception Exception
*/
public void execute(Connection conn, String sqlFile) throws Exception {
private void execute(Connection conn, String sqlFile) throws Exception {
Statement stmt = null;
try {
List<String> sqlList = loadSql(sqlFile);
stmt = conn.createStatement();
for (String sql : sqlList) {
@ -188,10 +189,13 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
} catch (Exception e) {
LogUtil.defaultLog.info(e.getMessage());
}
}
} finally {
if (stmt != null) {
stmt.close();
}
}
}
public static String getAppHome() {
return appHome;