Class DatabasePopulatorUtils
java.lang.Object
org.springframework.jdbc.datasource.init.DatabasePopulatorUtils
Utility methods for executing a
DatabasePopulator
.- Since:
- 3.1
- Author:
- Juergen Hoeller, Oliver Gierke, Sam Brannen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
execute
(DatabasePopulator populator, DataSource dataSource) Execute the givenDatabasePopulator
against the givenDataSource
.
-
Constructor Details
-
DatabasePopulatorUtils
public DatabasePopulatorUtils()
-
-
Method Details
-
execute
public static void execute(DatabasePopulator populator, DataSource dataSource) throws DataAccessException Execute the givenDatabasePopulator
against the givenDataSource
.The
Connection
for the suppliedDataSource
will be committed if it is not configured forauto-commit
and is not transactional.- Parameters:
populator
- theDatabasePopulator
to executedataSource
- theDataSource
to execute against- Throws:
DataAccessException
- if an error occurs, specifically aScriptException
- See Also:
-