Merge branch '2.7.x'

This commit is contained in:
Andy Wilkinson
2022-02-24 12:06:21 +00:00
21 changed files with 823 additions and 0 deletions

View File

@@ -419,6 +419,22 @@ include::code:MyDataCassandraTests[]
[[features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase]]
==== Auto-configured Data Couchbase Tests
You can use `@DataCouchbaseTest` to test Couchbase applications.
By default, it configures a `CouchbaseTemplate` or `ReactiveCouchbaseTemplate`, scans for `@Document` classes, and configures Spring Data Couchbase repositories.
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataCouchbaseTest` annotation is used.
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
(For more about using Couchbase with Spring Boot, see "<<data#data.nosql.couchbase>>", earlier in this chapter.)
TIP: A list of the auto-configuration settings that are enabled by `@DataCouchbaseTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
The following example shows a typical setup for using Couchbase tests in Spring Boot:
include::code:MyDataCouchbaseTests[]
[[features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch]]
==== Auto-configured Data Elasticsearch Tests
You can use `@DataElasticsearchTest` to test Elasticsearch applications.