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:
@@ -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]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user