有没有人在Spring 4.2中实现过EhCache 3(不使用Spring Boot)?如果有,那么实现的步骤是什么?
问题在于spring-context-support(添加了Spring的缓存注释)期望Ehcache的CacheManager位于这个类路径上:net.sf.ehcache.CacheManager。
然而,在Ehcache 3中,CacheManager类位于另一个类路径上:org.ehcache.CacheManager。
因此,基本上spring-context-support不支持Ehcache 3。您必须直接使用JSR-107注释,而不是Spring提供的注释。
如果有人实现了这种组合,请提供您的ehcache.xml和Spring配置以供参考。
Invalid content was found starting with element '{"http://www.ehcache.org/v3":service}'. One of '{"http://www.ehcache.org/v3":thread-pools, "http://www.ehcache.org/v3":event-dispatch, "http://www.ehcache.org/v3":write-behind, "http://www.ehcache.org/v3":heap-store, "http://www.ehcache.org/v3":disk-store, "http://www.ehcache.org/v3":cache, "http://www.ehcache.org/v3":cache-template}' is expected.
- wonsuc