程序包 org.springframework.jdbc.datasource.init
Provides extensible support for initializing databases through scripts.
接口概要 接口 说明 DatabasePopulator Strategy used to populate, initialize, or clean up a database.类概要 类 说明 CompositeDatabasePopulator CompositeDatabasePopulator
that delegates to a list of givenDatabasePopulator
implementations, executing all scripts.DatabasePopulatorUtils Utility methods for executing aDatabasePopulator
.DataSourceInitializer ResourceDatabasePopulator Populates, initializes, or cleans up a database using SQL scripts defined in external resources.ScriptUtils Generic utility methods for working with SQL scripts.异常错误概要 异常错误 说明 CannotReadScriptException Thrown byScriptUtils
if an SQL script cannot be read.ScriptException Root of the hierarchy of data access exceptions that are related to processing of SQL scripts.ScriptParseException Thrown byScriptUtils
if an SQL script cannot be properly parsed.ScriptStatementFailedException Thrown byScriptUtils
if a statement in an SQL script failed when executing it against the target database.UncategorizedScriptException Thrown when we cannot determine anything more specific than "something went wrong while processing an SQL script": for example, aSQLException
from JDBC that we cannot pinpoint more precisely.