public class DataSourceScriptDatabaseInitializer extends AbstractScriptDatabaseInitializer
InitializingBean
that performs DataSource
initialization using schema
(DDL) and data (DML) scripts.Constructor and Description |
---|
DataSourceScriptDatabaseInitializer(DataSource dataSource,
DatabaseInitializationSettings settings)
Creates a new
DataSourceScriptDatabaseInitializer that will initialize the
given DataSource using the given settings. |
Modifier and Type | Method and Description |
---|---|
protected DataSource |
getDataSource()
Returns the
DataSource that will be initialized. |
protected void |
runScripts(List<Resource> resources,
boolean continueOnError,
String separator,
Charset encoding) |
afterPropertiesSet, initializeDatabase, setResourceLoader
public DataSourceScriptDatabaseInitializer(DataSource dataSource, DatabaseInitializationSettings settings)
DataSourceScriptDatabaseInitializer
that will initialize the
given DataSource
using the given settings.dataSource
- data source to initializesettings
- initialization settingsprotected final DataSource getDataSource()
DataSource
that will be initialized.protected void runScripts(List<Resource> resources, boolean continueOnError, String separator, Charset encoding)
runScripts
in class AbstractScriptDatabaseInitializer