Injects CacheManager using @Qualifier.

If the user has a custom CacheManager for other uses, this avoids an injection error due to multiple CacheManager beans defined.

Fixes gh-2841
This commit is contained in:
spencergibb
2023-01-19 12:20:30 -05:00
parent 7ed4623809
commit 25abaca600
4 changed files with 74 additions and 4 deletions

View File

@@ -2182,6 +2182,8 @@ This filter also implements the automatic calculation of the `max-age value in t
If `max-age` is present on the original response, the value is rewritten with the number of seconds set in the `timeToLive` configuration parameter.
In subsequent calls, this value is recalculated with the number of seconds left until the response expires.
WARNING: If your project creates custom `CacheManager` beans, it will either need to be marked with `@Primary` or injected using `@Qualifier`.
=== Forward Routing Filter
The `ForwardRoutingFilter` looks for a URI in the exchange attribute `ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR`.