title: Cannot resolve reference to bean 'cacheManager'
body: <p>Trying to run a unit test on a Controller in my Spring app.</p>
  
  <p>My test class:</p>
  
  <pre><code>@RunWith (SpringJUnit4ClassRunner.class)
  @WebAppConfiguration
  @ContextConfiguration ({"classpath*:WEB-INF/spring/application-context-config.xml", "data-source-test-config.xml", 
                          "classpath*:WEB-INF/spring/security-context-config.xml"})
  public class PropsControllerTest 
  </code></pre>
  
  <p>The error I'm getting:</p>
  
  <pre><code>2015-04-03 23:22:51.729 WARN  AbstractApplicationContext:487 - Exception encountered during context initialization - cancelling refresh attempt
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.interceptor.CacheInterceptor#0': Cannot resolve reference to bean 'cacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
  </code></pre>
  
  <p>My application-context-config.xml defines:</p>
  
  <pre><code>&lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"&gt;
      &lt;property name="cacheManager" ref="ehcache"/&gt;
  &lt;/bean&gt;
  &lt;bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"&gt;
      &lt;property name="configLocation" value="classpath:ehcache.xml"/&gt;
      &lt;property name="shared" value="true"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>ehcache.xml Defines:</p>
  
  <pre><code>&lt;ehcache&gt;
      &lt;cache name="backslap"
             maxBytesLocalHeap="256M"
             eternal="false"
             timeToLiveSeconds="3600"
             overflowToDisk="false"
             memoryStoreEvictionPolicy="LRU"/&gt;
  &lt;/ehcache&gt;
  </code></pre>
  
  <p>I've got copies of ehcache.xml in three places: src/main/resources/, test/main/resources/ and in the directory of my test class.  Nothing fixes this problem.</p>
  
  <p>How do I make Spring find the file during testing (it has no problem finding the file when running)?  Failing that, how do I make Spring stop wanting this information (the cache is utterly worthless during my tests), or at least let me just specify it in my application-context-config.xml file?</p>
  
  <p>Thank you for any help.</p>