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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexecute(DatabasePopulator populator, DataSource dataSource) Execute the givenDatabasePopulatoragainst the givenDataSource.
-
Constructor Details
-
DatabasePopulatorUtils
public DatabasePopulatorUtils()
-
-
Method Details
-
execute
public static void execute(DatabasePopulator populator, DataSource dataSource) throws DataAccessException Execute the givenDatabasePopulatoragainst the givenDataSource.As of Spring Framework 5.3.11, the
Connectionfor the suppliedDataSourcewill be committed if it is not configured forauto-commitand is not transactional.- Parameters:
populator- theDatabasePopulatorto executedataSource- theDataSourceto execute against- Throws:
DataAccessException- if an error occurs, specifically aScriptException- See Also:
-