packagecom.athena.ckx.util;importjava.io.FileInputStream;importjava.io.InputStream;importjava.sql.Connection;importjava.sql.Statement;importjava.util.ArrayList;importjava.util.Arrays;importjava.util.List;/*** SQL 脚本执行类
*@authorkong
**/
public final classSqlFileExecutor {public static voidmain(String[] args) {try{
List sqlList = loadSql("src/test/resources/config/script.sql");
System.out.println("size:" +sqlList.size());for(String sql : sqlList) {
System.out.println(sql);
}
}catch(Exception e) {//TODO Auto-generated catch block
e.printStackTrace();
}
}/*** 读取 SQL 文件,获取 SQL 语句
*@paramsqlFile
* SQL 脚本文件
*@returnList 返回所有 SQL 语句的 List
*@throwsException*/
private static List loadSql(String sqlFile) throwsException {
List sqlList = n