Skip to content

Commit 89cb599

Browse files
committed
Merge branch '2.7.x' into 3.0.x
Closes gh-36755
2 parents 2dc8531 + d101004 commit 89cb599

File tree

1 file changed

+16
-0
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/features

1 file changed

+16
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,22 @@ If you prefer your test to run against a real database, you can use the `@AutoCo
615615

616616

617617

618+
[[features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc]]
619+
==== Auto-configured Data R2DBC Tests
620+
`@DataR2dbcTest` is similar to `@DataJdbcTest` but is for tests that use Spring Data R2DBC repositories.
621+
By default, it configures an in-memory embedded database, a `R2dbcEntityTemplate`, and Spring Data R2DBC repositories.
622+
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataR2dbcTest` annotation is used.
623+
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
624+
625+
TIP: A list of the auto-configurations that are enabled by `@DataR2dbcTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
626+
627+
By default, Data R2DBC tests are not transactional.
628+
629+
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`.
630+
(See "<<features#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa>>".)
631+
632+
633+
618634
[[features.testing.spring-boot-applications.autoconfigured-jooq]]
619635
==== Auto-configured jOOQ Tests
620636
You can use `@JooqTest` in a similar fashion as `@JdbcTest` but for jOOQ-related tests.

0 commit comments

Comments
 (0)