blob: 4ff1f78d0223be2563e2dce7f6a3e4d9cbfe6edd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package at.ac.tuwien.sepm.assignment.groupphase.application;
import at.ac.tuwien.sepm.assignment.groupphase.util.JDBCConnectionManager;
import java.io.InputStreamReader;
import java.sql.SQLException;
import org.h2.tools.RunScript;
import org.springframework.core.io.ClassPathResource;
public class PopulateDB {
public static void main(String[] args) throws SQLException {
JDBCConnectionManager jdbcConnectionManager = new JDBCConnectionManager();
RunScript.execute(
jdbcConnectionManager.getConnection(),
new InputStreamReader(
ClassPathResource.class.getResourceAsStream("/sql/testdata.sql")));
jdbcConnectionManager.closeConnection();
}
}
|