16 Commits
Author SHA1 Message Date
Sam Brannen edd497c20f Polish Javadoc and reference documentation for caching annotations
This commit documents the semantics for the `#result` SpEL expression
variable for a method that returns a Flux for @⁠Cacheable and
@⁠CachePut, both of which have always collected such a Flux's values
into a List. For such a method, `#result` refers to that List rather
than the Flux itself.

This commit addresses a number of unrelated inconsistencies in the
documentation as well.

See gh-37309
2026-09-21 17:16:43 +02:00
Sam Brannen 26de340102 Stop truncating Flux results to first element with @⁠CacheEvict
Prior to this commit, ReactiveCachingHandler.processCacheEvicts()
adapted every reactive return value via Mono.from(), which subscribes
for only the first element and cancels the upstream Publisher. For a
@⁠CacheEvict method that returns a Flux, this silently truncated the
returned sequence to its first element. In addition, the `#result`
variable in `condition` SpEL expressions was bound to only that first
emitted element.

To address that, this commit mirrors the existing multi-value handling
in processPutRequest(). When the adapter reports isMultiValue(), a side
Subscriber is subscribed via publish().refCount(2) that exhausts the
Flux and collects its values into a List for eviction, while the
original, unmodified Flux is returned to the caller. Consequently, the
`#result` variable in `condition` SpEL expressions for a Flux-returning
@⁠CacheEvict method is now the full List of emitted elements rather
than just the first element, making it consistent with @⁠Cacheable and
@⁠CachePut.

This commit also improves spr14235AdaptsToReactorFlux() in
CacheReproTests. Previously it exercised @⁠CacheEvict only with a
single-element Flux and never asserted on the returned sequence. Now it
uses a multi-element Flux and verifies that all elements are both
returned to the caller and visible to the `condition` expression.

Last but not least, this commit documents the aforementioned
`#result`/Flux semantics in @⁠CacheEvict's Javadoc and in the reference
manual, since both were previously invalid or incomplete for this
scenario.

Closes gh-37309
2026-09-21 17:16:34 +02:00
Sam Brannen 2aa36fea64 Polish contribution
See gh-37005
2026-09-18 16:48:27 +02:00
flinter fc10d200bf Document combining @⁠Retryable with proxy-based features
Add a "Combining @⁠Retryable with Other Proxy-Based Features" section
to the resilience reference documentation, covering interaction with
@⁠Transactional, @⁠Cacheable, and @⁠Async, as well as advice order
customization between @⁠Retryable and @⁠Async via
@⁠EnableResilientMethods(order) and @⁠EnableAsync(order).

Also document the advice chain semantics in @⁠Retryable Javadoc, add
cross-reference TIP blocks in the @⁠Async, @⁠Cacheable, and
@⁠Transactional reference sections, add a @⁠Cacheable combination test
to RetryInterceptorTests, and add RetryableTransactionTests in
spring-tx for the @⁠Transactional combination.

See gh-35584
Closes gh-37005

Signed-off-by: jhan0121 <jhan0121@gmail.com>
2026-09-18 16:37:25 +02:00
Sam Brannen 15d7a3b327 Use in-document <<id,text>> syntax for same-page links in reference docs
Prior to this commit, some same-page links in our Antora-based docs
were written using the `xref:` macro, which Antora resolves as a
cross-page reference. However, a same-page target can be misread as a
page reference and break the site build (as nearly happened in
gh-37152), whereas `<<id,text>>` only ever resolves against the current
page's own anchors.

To address that inconsistency and avoid potential future bugs (broken
links), this commit converts all such same-page `xref:` links to
`<<id,text>>`, leaving genuine cross-page `xref:` links are unaffected.

Closes gh-37161
2026-08-20 14:53:32 +02:00
Juergen Hoeller a0c083619f Consistent line breaks in reference documentation 2025-07-10 19:33:34 +02:00
Yanming Zhou 8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
Sam Brannen a19acc65b4 Merge branch '6.1.x' 2024-08-30 11:24:59 +02:00
Sam Brannen dca55236c4 Stop documenting use of -debug compiler flag in reference manual
Closes gh-33453
2024-08-30 11:24:39 +02:00
Stéphane Nicoll 46ba13b645 Review Caching infrastructure documentation
Closes gh-33288
2024-07-29 11:29:35 +02:00
Sébastien Deleuze c6459b40e4 Modernize the integration section of the refdoc
This commit adds Java and Kotlin tabs to XML code snippets where
relevant, and leverages code includes.

Closes gh-32600
2024-05-06 16:05:35 +02:00
Simon Baslé 8567402969 Extract recurring asciidoc links to attributes, cleanup old doc files
This commit extract spring-related links and recurring external links
into asciidoctor attributes to be used by the Antora toolchain.

It notably homogenizes links to:
 - IETF RFCs
 - Java Community Process JSRs
 - the Java API Documentation (on the Java 17 version)
 - Kotlin documentations (on the Kotlinlang.org version)
 - the Spring Boot reference guide (on the `html` version)

This commit also reworks most link attributes to follow a
Project-Category-Misc syntax. For example, `spring-boot-docs` rather
than `docs-spring-boot`.

Finally, it makes an effort to clean up remainders from the previous
documentation toolchain, namely the `docs/asciidoc` folder and 
`modules/ROOT/pages/attributes.adoc` file.

Closes gh-26864
Closes gh-31619
2023-11-21 15:59:24 +01:00
Juergen Hoeller 26da0e49e4 Show example for CaffeineCacheManager async cache setup
See gh-28250
2023-08-21 15:39:02 +02:00
Juergen Hoeller cb4222d2c2 Documentation for caching with CompletableFuture and reactive types
See gh-17559
See gh-17920
2023-07-26 13:07:22 +02:00
Rob Winch 139cde47e2 Fix cross references 2023-05-04 15:35:05 +01:00
Rob Winch 9f49d24833 Split files 2023-05-04 15:35:05 +01:00