为什么在 Spring Boot 1.5.3 中弃用了 GuavaCacheConfiguration?
Why is GuavaCacheConfiguration deprecated in Spring Boot 1.5.3?
我正在考虑用 AutoConfiguration 替换自定义 Guava 缓存配置...但发现后者已被弃用。
尝试在 Spring 引导文档和 GitHub 存储库中搜索,但没有找到明确的答案。它只是在稳定版本中被弃用并在主版本中被删除。
我尊重(并使用)Spring Boot 和 Guava,所以我想了解此更改的原因。
改为在 Spring Boot features - Caching and it says that should use Caffeine 中搜索 "Guava":
Caffeine is a Java 8 rewrite of Guava’s cache and will supersede the
Guava support in Spring Boot 2.0.
它基本上是类固醇的 Guava 缓存(它具有类似的界面),因此切换应该很简单。
我正在考虑用 AutoConfiguration 替换自定义 Guava 缓存配置...但发现后者已被弃用。
尝试在 Spring 引导文档和 GitHub 存储库中搜索,但没有找到明确的答案。它只是在稳定版本中被弃用并在主版本中被删除。
我尊重(并使用)Spring Boot 和 Guava,所以我想了解此更改的原因。
改为在 Spring Boot features - Caching and it says that should use Caffeine 中搜索 "Guava":
Caffeine is a Java 8 rewrite of Guava’s cache and will supersede the Guava support in Spring Boot 2.0.
它基本上是类固醇的 Guava 缓存(它具有类似的界面),因此切换应该很简单。