Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hxy1991 committed Oct 9, 2018
1 parent 55433f0 commit 074d6aa
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,23 @@ private List<String> loadSql(String sqlFile) throws Exception {
* @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;
List<String> sqlList = loadSql(sqlFile);
stmt = conn.createStatement();
for (String sql : sqlList) {
try {
stmt.execute(sql);
} catch (Exception e) {
LogUtil.defaultLog.info(e.getMessage());
try {
List<String> sqlList = loadSql(sqlFile);
stmt = conn.createStatement();
for (String sql : sqlList) {
try {
stmt.execute(sql);
} catch (Exception e) {
LogUtil.defaultLog.info(e.getMessage());
}
}
} finally {
if (stmt != null) {
stmt.close();
}

}
stmt.close();
}

public static String getAppHome() {
Expand Down

0 comments on commit 074d6aa

Please sign in to comment.