【问题标题】:Can the Spring cache framework be used to cache a non-serializable objects?Spring缓存框架可以用来缓存不可序列化的对象吗? 【发布时间】:2013-02-19 23:58:28 【问题描述】: 我需要缓存一个无法序列化的对象。我正在寻找一些方法来通过包装器缓存这些对象。能做到吗? 【问题讨论】: 标签: spring ehcache serializable 【解决方案1】: 您要缓存的对象不需要序列化,但是您生成的用于存储相应对象的键当然必须序列化。 Caching Example with Spring Annotations and Ehcache Making things @Cacheable ehcache-spring-annotations (Using Cacheable) ehcache-spring-annotations (Frequently Asked Questions) 【讨论】: