luokn1995
小罗技术笔记
采纳率0%
2018-03-18 12:19 阅读 1.2k

shiro整合ehcache总是报错

5

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条回答 默认 最新

  • Amo_lt Amo_lt 2018-03-19 02:23
      Cannot convert value of type [net.sf.ehcache.CacheManager] to required type [org.apache.shiro.cache.CacheManager] for property 'cacheManager'
    

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

    点赞 评论 复制链接分享
  • luokn1995 小罗技术笔记 2018-03-19 07:44

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

    点赞 评论 复制链接分享

相关推荐