|
|
@ -39,12 +39,10 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
|
|
|
|
* Annotation for a JDBC test that focuses <strong>only</strong> on JDBC-based components.
|
|
|
|
* for a typical jdbc test. Can be used when a test focuses <strong>only</strong> on
|
|
|
|
|
|
|
|
* jdbc-based components.
|
|
|
|
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
|
* Using this annotation will disable full auto-configuration and instead apply only
|
|
|
|
* Using this annotation will disable full auto-configuration and instead apply only
|
|
|
|
* configuration relevant to jdbc tests.
|
|
|
|
* configuration relevant to JDBC tests.
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
|
* By default, tests annotated with {@code @JdbcTest} are transactional and roll back at
|
|
|
|
* By default, tests annotated with {@code @JdbcTest} are transactional and roll back at
|
|
|
|
* the end of each test. They also use an embedded in-memory database (replacing any
|
|
|
|
* the end of each test. They also use an embedded in-memory database (replacing any
|
|
|
@ -56,6 +54,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
|
|
|
|
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
|
|
|
|
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
|
|
|
|
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
|
|
|
|
* annotation.
|
|
|
|
* annotation.
|
|
|
|
|
|
|
|
* <p>
|
|
|
|
|
|
|
|
* When using JUnit 4, this annotation should be used in combination with
|
|
|
|
|
|
|
|
* {@code @RunWith(SpringRunner.class)}.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author Stephane Nicoll
|
|
|
|
* @author Stephane Nicoll
|
|
|
|
* @author Artsiom Yudovin
|
|
|
|
* @author Artsiom Yudovin
|
|
|
|