ConnectionFactoryInitializer
instead.@Deprecated public class ConnectionFactoryInitializer extends Object implements InitializingBean, DisposableBean
DatabasePopulator
Constructor and Description |
---|
ConnectionFactoryInitializer()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
Use the
database populator to set up the database. |
void |
destroy()
Deprecated.
Use the
database cleaner to clean up the database. |
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Deprecated.
The
ConnectionFactory for the database to populate when this component is initialized and to clean up when
this component is shut down. |
void |
setDatabaseCleaner(DatabasePopulator databaseCleaner)
Deprecated.
Set the
DatabasePopulator to execute during the bean destruction phase, cleaning up the database and
leaving it in a known state for others. |
void |
setDatabasePopulator(DatabasePopulator databasePopulator)
Deprecated.
Set the
DatabasePopulator to execute during the bean initialization phase. |
void |
setEnabled(boolean enabled)
Deprecated.
Flag to explicitly enable or disable the
database populator and
database cleaner . |
public void setConnectionFactory(ConnectionFactory connectionFactory)
ConnectionFactory
for the database to populate when this component is initialized and to clean up when
this component is shut down.
This property is mandatory with no default provided.
connectionFactory
- the R2DBC ConnectionFactory
.public void setDatabasePopulator(DatabasePopulator databasePopulator)
DatabasePopulator
to execute during the bean initialization phase.databasePopulator
- the DatabasePopulator
to use during initializationsetDatabaseCleaner(org.springframework.data.r2dbc.connectionfactory.init.DatabasePopulator)
public void setDatabaseCleaner(DatabasePopulator databaseCleaner)
DatabasePopulator
to execute during the bean destruction phase, cleaning up the database and
leaving it in a known state for others.databaseCleaner
- the DatabasePopulator
to use during destructionsetDatabasePopulator(org.springframework.data.r2dbc.connectionfactory.init.DatabasePopulator)
public void setEnabled(boolean enabled)
database populator
and
database cleaner
.enabled
- true if the database populator and database cleaner should be called on startup and
shutdown, respectivelypublic void afterPropertiesSet()
database populator
to set up the database.afterPropertiesSet
in interface InitializingBean
public void destroy()
database cleaner
to clean up the database.destroy
in interface DisposableBean
Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.