use of org.springframework.jdbc.datasource.init.DataSourceInitializer in project Activiti by Activiti.
the class DatabaseInititializer method dataSourceInitializer.
@Bean
public DataSourceInitializer dataSourceInitializer() {
DataSourceInitializer initializer = new DataSourceInitializer();
initializer.setDataSource(dataSource);
initializer.setDatabasePopulator(databasePopulator());
return initializer;
}
use of org.springframework.jdbc.datasource.init.DataSourceInitializer in project spring-data-jdbc by spring-projects.
the class DataSourceConfiguration method initializer.
@Bean
DataSourceInitializer initializer() {
DataSourceInitializer initializer = new DataSourceInitializer();
initializer.setDataSource(dataSource());
String[] activeProfiles = environment.getActiveProfiles();
String profile = activeProfiles.length == 0 ? "" : activeProfiles[0];
ClassPathResource script = new ClassPathResource(TestUtils.createScriptName(testClass, profile));
ResourceDatabasePopulator populator = new ResourceDatabasePopulator(script);
customizePopulator(populator);
initializer.setDatabasePopulator(populator);
return initializer;
}
use of org.springframework.jdbc.datasource.init.DataSourceInitializer in project spring-security by spring-projects.
the class JdbcUserDetailsManagerConfigurer method getDataSourceInit.
private DataSourceInitializer getDataSourceInit() {
DataSourceInitializer dsi = new DataSourceInitializer();
dsi.setDatabasePopulator(getDatabasePopulator());
dsi.setDataSource(dataSource);
return dsi;
}
Aggregations