use of org.springframework.jdbc.datasource.init.ResourceDatabasePopulator in project vladmihalcea.wordpress.com by vladmihalcea.
the class DatabaseScriptLifecycleHandler method runInitScripts.
private void runInitScripts() {
final ResourceDatabasePopulator resourceDatabasePopulator = createResourceDatabasePopulator();
jdbcTemplate.execute(new ConnectionCallback<Void>() {
@Override
public Void doInConnection(Connection con) throws SQLException, DataAccessException {
resourceDatabasePopulator.setScripts(getInitScripts());
resourceDatabasePopulator.populate(con);
return null;
}
});
}
use of org.springframework.jdbc.datasource.init.ResourceDatabasePopulator in project Activiti by Activiti.
the class DatabaseInititializer method databasePopulator.
private DatabasePopulator databasePopulator() {
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.addScript(schemaScript);
populator.addScript(dataScript);
return populator;
}
Aggregations