Class EmbeddedDatabaseConfigurers
java.lang.Object
org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseConfigurers
Maps well-known embedded database types
to
EmbeddedDatabaseConfigurer
strategies.- Since:
- 6.2
- Author:
- Keith Donald, Oliver Gierke, Sam Brannen, Stephane Nicoll
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EmbeddedDatabaseConfigurer
customizeConfigurer
(EmbeddedDatabaseType type, UnaryOperator<EmbeddedDatabaseConfigurer> customizer) Customize the default configurer for the given embedded database type.static EmbeddedDatabaseConfigurer
Return a configurer instance for the given embedded database type.
-
Constructor Details
-
EmbeddedDatabaseConfigurers
public EmbeddedDatabaseConfigurers()
-
-
Method Details
-
getConfigurer
Return a configurer instance for the given embedded database type.- Parameters:
type
- the embedded database type- Returns:
- the configurer instance
- Throws:
IllegalStateException
- if the driver for the specified database type is not available
-
customizeConfigurer
public static EmbeddedDatabaseConfigurer customizeConfigurer(EmbeddedDatabaseType type, UnaryOperator<EmbeddedDatabaseConfigurer> customizer) Customize the default configurer for the given embedded database type.The
customizer
typically usesEmbeddedDatabaseConfigurerDelegate
to customize things as necessary.- Parameters:
type
- the embedded database typecustomizer
- the customizer to return based on the default- Returns:
- the customized configurer instance
- Throws:
IllegalStateException
- if the driver for the specified database type is not available
-