shiro整合ehcache总是报错 5C

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-shiro.xml]: Cannot resolve reference to bean 'sessionManager' while setting bean property 'sessionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [spring/spring-shiro.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'net.sf.ehcache.CacheManager' to required type 'org.apache.shiro.cache.CacheManager' for property 'cacheManager'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [net.sf.ehcache.CacheManager] to required type [org.apache.shiro.cache.CacheManager] for property 'cacheManager': no matching editors or conversion strategy found

Caused by: java.lang.IllegalStateException: Cannot convert value of type [net.sf.ehcache.CacheManager] to required type [org.apache.shiro.cache.CacheManager] for property 'cacheManager': no matching editors or conversion strategy found

2个回答

  Cannot convert value of type [net.sf.ehcache.CacheManager] to required type [org.apache.shiro.cache.CacheManager] for property 'cacheManager'

cacheManager引用的包错了,确定自己要引用哪个包。

Amo_lt
Amo_lt 回复luokn1995: session没配好吧
2 年多之前 回复
luokn1995
小罗技术笔记 是jar 出问题了 现在不报错了 但是按照网上的教程来实现登录人数控制时总是报 org.apache.shiro.session.UnknownSessionException: There is no session with id 找了半天没有找到解决方法
2 年多之前 回复

是jar 出问题了 现在不报错了 但是按照网上的教程来实现登录人数控制时总是报 org.apache.shiro.session.UnknownSessionException: There is no session with id 找了半天没有找到解决方法

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问