注释类型 AutoConfigureTestDatabase
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @Inherited @ImportAutoConfiguration @PropertyMapping("spring.test.database") @Deprecated public @interface AutoConfigureTestDatabase
已过时。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
.
可选元素概要
可选元素 修饰符和类型 可选元素 说明 org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection
connection
已过时。The type of connection to be established whenreplacing
the data source.AutoConfigureTestDatabase.Replace
replace
已过时。Determines what type of existing DataSource beans can be replaced.
元素详细资料
replace
AutoConfigureTestDatabase.Replace replace
已过时。Determines what type of existing DataSource beans can be replaced.- 返回:
- the type of existing DataSource to replace
- 默认值:
- org.springframework.boot.test.autoconfigure.orm.jpa.AutoConfigureTestDatabase.Replace.ANY
connection
org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection connection
已过时。The type of connection to be established whenreplacing
the data source. By default will attempt to detect the connection based on the classpath.- 返回:
- the type of connection to use
- 默认值:
- org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection.NONE