ScriptRunner runner = new ScriptRunner(conn);
runner.setLogWriter(null);
runner.setErrorLogWriter(null);
String resource = "org/apache/ibatis/submitted/complex_property/db.sql";
Reader reader = Resources.getResourceAsReader(resource);
runner.runScript(reader);
conn.close();
}
private static void setupSqlSessionFactory() throws IOException {
String resource = "org/apache/ibatis/submitted/complex_property/Configuration.xml";