Annotation Type AutoConfigureTestDatabase
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @Inherited @ImportAutoConfiguration @PropertyMapping("spring.test.database") @Deprecated public @interface AutoConfigureTestDatabase
Deprecated.as of 1.5 in favor ofAutoConfigureTestDatabase
Annotation that can be applied to a test class to configure a test database to use instead of any application defined or auto-configuredDataSource
.
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection
connection
Deprecated.The type of connection to be established whenreplacing
the data source.AutoConfigureTestDatabase.Replace
replace
Deprecated.Determines what type of existing DataSource beans can be replaced.
Element Detail
replace
AutoConfigureTestDatabase.Replace replace
Deprecated.Determines what type of existing DataSource beans can be replaced.- Returns:
- the type of existing DataSource to replace
- Default:
- org.springframework.boot.test.autoconfigure.orm.jpa.AutoConfigureTestDatabase.Replace.ANY
connection
org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection connection
Deprecated.The type of connection to be established whenreplacing
the data source. By default will attempt to detect the connection based on the classpath.- Returns:
- the type of connection to use
- Default:
- org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection.NONE