Auto-configure JdbcTemplate with DataJpaTest

This commit adds `JdbcTemplateAutoConfiguration` to the list of auto-
configurations that are applied with `DataJpaTest`. This effectively
allows to inject a `JdbcTemplate` in any `@DataJpaTest` test.

Closes gh-6802
This commit is contained in:
Stephane Nicoll
2016-09-02 09:38:07 +02:00
parent 65b4f61a35
commit 52d7282f5e
3 changed files with 10 additions and 1 deletions

View File

@@ -5204,7 +5204,8 @@ Data JPA tests may also inject a
{sc-spring-boot-test-autoconfigure}/orm/jpa/TestEntityManager.{sc-ext}[`TestEntityManager`]
bean which provides an alternative to the standard JPA `EntityManager` specifically
designed for tests. If you want to use `TestEntityManager` outside of `@DataJpaTests` you
can also use the `@AutoConfigureTestEntityManager` annotation.
can also use the `@AutoConfigureTestEntityManager` annotation. A `JdbcTemplate` is also
available should you need that.
[source,java,indent=0]
----