Fix #119
This commit is contained in:
parent
55433f0995
commit
074d6aa77a
@ -178,19 +178,23 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
|
|||||||
* @param sqlFile sql
|
* @param sqlFile sql
|
||||||
* @throws Exception Exception
|
* @throws Exception Exception
|
||||||
*/
|
*/
|
||||||
public void execute(Connection conn, String sqlFile) throws Exception {
|
private void execute(Connection conn, String sqlFile) throws Exception {
|
||||||
Statement stmt = null;
|
Statement stmt = null;
|
||||||
List<String> sqlList = loadSql(sqlFile);
|
try {
|
||||||
stmt = conn.createStatement();
|
List<String> sqlList = loadSql(sqlFile);
|
||||||
for (String sql : sqlList) {
|
stmt = conn.createStatement();
|
||||||
try {
|
for (String sql : sqlList) {
|
||||||
stmt.execute(sql);
|
try {
|
||||||
} catch (Exception e) {
|
stmt.execute(sql);
|
||||||
LogUtil.defaultLog.info(e.getMessage());
|
} catch (Exception e) {
|
||||||
|
LogUtil.defaultLog.info(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (stmt != null) {
|
||||||
|
stmt.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
stmt.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAppHome() {
|
public static String getAppHome() {
|
||||||
|
Loading…
Reference in New Issue
Block a user