* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to mybatis tests. *
- * By default, tests annotated with {@code @JdbcTest} will use an embedded in-memory
+ * By default, tests annotated with {@code @MybatisTest} will use an embedded in-memory
* database (replacing any explicit or usually auto-configured DataSource). The
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} annotation can be used to
* override these settings.
@@ -63,6 +67,7 @@
@Documented
@Inherited
@BootstrapWith(SpringBootTestContextBootstrapper.class)
+@ExtendWith(SpringExtension.class)
@OverrideAutoConfiguration(enabled = false)
@TypeExcludeFilters(MybatisTypeExcludeFilter.class)
@Transactional
diff --git a/mybatis-spring-boot-test-autoconfigure/src/site/xdoc/index.xml.vm b/mybatis-spring-boot-test-autoconfigure/src/site/xdoc/index.xml.vm
index 01c0acf49..61ed5bdc8 100644
--- a/mybatis-spring-boot-test-autoconfigure/src/site/xdoc/index.xml.vm
+++ b/mybatis-spring-boot-test-autoconfigure/src/site/xdoc/index.xml.vm
@@ -335,6 +335,30 @@ public class PingTests {
+
+ The
+ Since 2.0.1, the
diff --git a/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestCustomFilterIntegrationTest.java b/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestCustomFilterIntegrationTest.java
index 6e13e2d95..b44ef418d 100644
--- a/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestCustomFilterIntegrationTest.java
+++ b/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestCustomFilterIntegrationTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2015-2017 the original author or authors.
+ * Copyright 2015-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@
* @author Kazuki Shimizu
* @since 1.2.1
*/
-@ExtendWith(SpringExtension.class)
@MybatisTest(includeFilters = @ComponentScan.Filter(Component.class), excludeFilters = @ComponentScan.Filter(Service.class))
@TestPropertySource(properties = {
"mybatis.type-aliases-package=org.mybatis.spring.boot.test.autoconfigure"
diff --git a/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestIntegrationTest.java b/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestIntegrationTest.java
index b67d888b2..f9fa75219 100755
--- a/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestIntegrationTest.java
+++ b/mybatis-spring-boot-test-autoconfigure/src/test/java/org/mybatis/spring/boot/test/autoconfigure/MybatisTestIntegrationTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2015-2017 the original author or authors.
+ * Copyright 2015-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,6 @@
* @author wonwoo
* @since 1.2.1
*/
-@ExtendWith(SpringExtension.class)
@MybatisTest
@TestPropertySource(properties = {
"mybatis.type-aliases-package=org.mybatis.spring.boot.test.autoconfigure",
@MybatisTest
can be used on JUnit 5.
+ @ExtendWith(SpringExtension.class)
can omit as follow:
+