Spring Framework DataSourceInitializer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DataSourceInitializer class.

This code example shows how to use the following methods:setDataSource, setDatabasePopulator
This code example shows how to use the following methods:setDataSource, setDatabasePopulator
This code example shows how to use the following methods:afterPropertiesSet, setDataSource, setDatabasePopulator
	} 
 
	private void populateDataBase(DataSource dataSource) throws Exception {
		ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
		databasePopulator.addScript(new ClassPathResource("test-data.sql", this.getClass()));
		DataSourceInitializer initializer = new DataSourceInitializer();
		initializer.setDataSource(dataSource);
		initializer.setDatabasePopulator(databasePopulator);
		initializer.afterPropertiesSet();
	} 
 
	/* methods for subclasses */ 
 
	protected abstract void setUpResources(DataSource dataSource) throws Exception;
 
	protected abstract FlowExecutionListener getListener(); 
 
	protected abstract void assertSessionBound(); 
 
	protected abstract void assertSessionNotBound(); 
6
CodeRank
See Code Examples for Spring Framework DataSourceInitializer Methods: