title: Using ehcache 3 with Spring Annotations (not using Spring Boot)
body: <p>I'm trying to get Ehcache 3 working with Spring 4 without using Spring boot.</p>
  
  <p><a href="http://www.ehcache.org/blog/2016/05/18/ehcache3_jsr107_spring.html" rel="noreferrer">Here is a working example out there which uses Spring Boot</a>, but I'm working on an existing application which is not using Spring Boot.</p>
  
  <p>The problem is that spring-context-support (which adds Spring's cache annotations) expects the Ehcache's CacheManager to be on this classpath: net.sf.ehcache.CacheManager</p>
  
  <p>However, in Ehcache 3, the CacheManager class resides on another classpath: org.ehcache.CacheManager.</p>
  
  <p>So, basically spring-context-support does not support Ehcache 3. And you would have to use the JSR-107 annotations directly, not the annotations provided by Spring.</p>
  
  <p>But apparently it works with Spring Boot. Perhaps there is a way to make it work with a standard Spring Application as well. That's what I'm hoping. I really want to be using Spring's own annotations instead of the JSR-107 annotations.</p>