Browse Source

Refine behavior of @AutoConfigureCache

Closes gh-48522
pull/48537/head
Stéphane Nicoll 2 days ago
parent
commit
21aedaad3c
  1. 3
      documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc

3
documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc

@ -284,8 +284,7 @@ Doing so makes sure that caching is not required by slice tests.
For tests that enable a full context, such as javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation], an explicit configuration overriding the regular configuration is required. For tests that enable a full context, such as javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation], an explicit configuration overriding the regular configuration is required.
If caching is auto-configured, more options are available. If caching is auto-configured, more options are available.
Slice tests are annotated with javadoc:org.springframework.boot.test.autoconfigure.core.AutoConfigureCache[format=annotation], which replaces the auto-configured javadoc:org.springframework.cache.CacheManager[] by a no-op implementation. Tests can be annotated with javadoc:org.springframework.boot.test.autoconfigure.core.AutoConfigureCache[format=annotation] to replace the auto-configured javadoc:org.springframework.cache.CacheManager[] by a no-op implementation.
Integration tests can also benefit from this feature by annotate the relevant test class as follows:
include-code::MyIntegrationTests[] include-code::MyIntegrationTests[]

Loading…
Cancel
Save