Мой тестовый класс:
Код: Выделить всё
@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
Код: Выделить всё
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
Код: Выделить всё
Код: Выделить всё
Как заставить Spring найти файл во время тестирования (у него нет проблем с поиском файла при запуске)? В противном случае, как мне заставить Spring перестать нуждаться в этой информации (кэш совершенно бесполезен во время моих тестов) или, по крайней мере, позволить мне просто указать ее в моем файле application-context-config.xml?
Спасибо за любую помощь.
Подробнее здесь: https://stackoverflow.com/questions/294 ... chemanager
Мобильная версия