Class BatchDataSourceScriptDatabaseInitializer
java.lang.Object
org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer
org.springframework.boot.autoconfigure.batch.BatchDataSourceScriptDatabaseInitializer
- All Implemented Interfaces:
Aware
,InitializingBean
,ResourceLoaderAware
DataSourceScriptDatabaseInitializer
for the Spring Batch database. May be
registered as a bean to override auto-configuration.- Since:
- 2.6.0
- Author:
- Dave Syer, Vedran Pavic, Andy Wilkinson, Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
AbstractScriptDatabaseInitializer.Scripts
-
Constructor Summary
ConstructorDescriptionBatchDataSourceScriptDatabaseInitializer
(DataSource dataSource, BatchProperties.Jdbc properties) Create a newBatchDataSourceScriptDatabaseInitializer
instance.BatchDataSourceScriptDatabaseInitializer
(DataSource dataSource, DatabaseInitializationSettings settings) Create a newBatchDataSourceScriptDatabaseInitializer
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetSettings
(DataSource dataSource, BatchProperties.Jdbc properties) AdaptsSpring Batch JDBC properties
toDatabaseInitializationSettings
replacing any @@platform@@ placeholders.Methods inherited from class org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer
customize, getDataSource, isEmbeddedDatabase, runScripts
Methods inherited from class org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
afterPropertiesSet, initializeDatabase, setResourceLoader
-
Constructor Details
-
BatchDataSourceScriptDatabaseInitializer
public BatchDataSourceScriptDatabaseInitializer(DataSource dataSource, BatchProperties.Jdbc properties) Create a newBatchDataSourceScriptDatabaseInitializer
instance.- Parameters:
dataSource
- the Spring Batch data sourceproperties
- the Spring Batch JDBC properties- See Also:
-
BatchDataSourceScriptDatabaseInitializer
public BatchDataSourceScriptDatabaseInitializer(DataSource dataSource, DatabaseInitializationSettings settings) Create a newBatchDataSourceScriptDatabaseInitializer
instance.- Parameters:
dataSource
- the Spring Batch data sourcesettings
- the database initialization settings- See Also:
-
-
Method Details
-
getSettings
public static DatabaseInitializationSettings getSettings(DataSource dataSource, BatchProperties.Jdbc properties) AdaptsSpring Batch JDBC properties
toDatabaseInitializationSettings
replacing any @@platform@@ placeholders.- Parameters:
dataSource
- the Spring Batch data sourceproperties
- batch JDBC properties- Returns:
- a new
DatabaseInitializationSettings
instance - See Also:
-