Class R2dbcScriptDatabaseInitializer
java.lang.Object
org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializer
- All Implemented Interfaces:
Aware
,InitializingBean
,ResourceLoaderAware
- Direct Known Subclasses:
SqlR2dbcScriptDatabaseInitializer
An
InitializingBean
that initializes a database represented by an R2DBC
ConnectionFactory
.- Since:
- 2.5.0
- Author:
- Andy Wilkinson
-
Constructor Summary
ConstructorDescriptionR2dbcScriptDatabaseInitializer
(io.r2dbc.spi.ConnectionFactory connectionFactory, DatabaseInitializationSettings settings) Creates a newR2dbcScriptDatabaseInitializer
that will initialize the database recognized by the givenconnectionFactory
using the givensettings
. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Returns whether the database that is to be initialized is embedded.protected void
runScripts
(List<Resource> scripts, boolean continueOnError, String separator, Charset encoding) Methods inherited from class org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer
afterPropertiesSet, initializeDatabase, setResourceLoader
-
Constructor Details
-
R2dbcScriptDatabaseInitializer
public R2dbcScriptDatabaseInitializer(io.r2dbc.spi.ConnectionFactory connectionFactory, DatabaseInitializationSettings settings) Creates a newR2dbcScriptDatabaseInitializer
that will initialize the database recognized by the givenconnectionFactory
using the givensettings
.- Parameters:
connectionFactory
- connectionFactory for the databasesettings
- initialization settings
-
-
Method Details
-
isEmbeddedDatabase
protected boolean isEmbeddedDatabase()Description copied from class:AbstractScriptDatabaseInitializer
Returns whether the database that is to be initialized is embedded.- Overrides:
isEmbeddedDatabase
in classAbstractScriptDatabaseInitializer
- Returns:
true
if the database is embedded, otherwisefalse
-
runScripts
protected void runScripts(List<Resource> scripts, boolean continueOnError, String separator, Charset encoding) - Specified by:
runScripts
in classAbstractScriptDatabaseInitializer
-