类 AbstractScriptDatabaseInitializer
java.lang.Object
org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
- 所有已实现的接口:
Aware,InitializingBean,ResourceLoaderAware
public abstract class AbstractScriptDatabaseInitializer
extends Object
implements ResourceLoaderAware, InitializingBean
Base class for an
InitializingBean that performs SQL database initialization
using schema (DDL) and data (DML) scripts.- 从以下版本开始:
- 2.5.0
- 作者:
- Andy Wilkinson
-
嵌套类概要
嵌套类修饰符和类型类说明static classScripts to be used to initialize the database. -
构造器概要
构造器限定符构造器说明protectedCreates a newAbstractScriptDatabaseInitializerthat will initialize the database using the given settings. -
方法概要
修饰符和类型方法说明voidbooleanInitializes the database by applying schema and data scripts.protected booleanReturns whether the database that is to be initialized is embedded.protected abstract voidInitialize the database by running the givenscripts.voidsetResourceLoader(ResourceLoader resourceLoader)
-
构造器详细资料
-
AbstractScriptDatabaseInitializer
Creates a newAbstractScriptDatabaseInitializerthat will initialize the database using the given settings.- 参数:
settings- initialization settings
-
-
方法详细资料
-
setResourceLoader
- 指定者:
setResourceLoader在接口中ResourceLoaderAware
-
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中InitializingBean- 抛出:
Exception
-
initializeDatabase
public boolean initializeDatabase()Initializes the database by applying schema and data scripts.- 返回:
trueif one or more scripts were applied to the database, otherwisefalse
-
isEmbeddedDatabase
protected boolean isEmbeddedDatabase()Returns whether the database that is to be initialized is embedded.- 返回:
trueif the database is embedded, otherwisefalse- 从以下版本开始:
- 2.5.1
-
runScripts
Initialize the database by running the givenscripts.- 参数:
scripts- the scripts to run- 从以下版本开始:
- 3.0.0
-