Details
-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
I am using infinispan-spring4-remote in a Spring Boot 1.5 project. This declares the EnableInfinispanRemoteHttpSession in its main class.
I don't want to use the distribuited cache for http session externalization in unit/integration tests launched with JUnit. The problem is the application crashes when launching the tests:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.infinispan.spring.provider.SpringRemoteCacheManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1491)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
... 63 more
EnableInfinispanRemoteHttpSession imports InfinispanRemoteHttpSessionConfiguration and the latter doesn't have any way (@ConditionalOnProperty for instance) that would allow us to disable that behaviour.