zhangkaitao / shiro-example

跟我学Shiro(我的公众号:kaitao-1234567,我的新书:《亿级流量网站架构核心技术》)
4.82k stars 3.94k forks source link

ehcache.xml configure default cache #9

Open hqtc123 opened 10 years ago

hqtc123 commented 10 years ago

参考第十二章的时候,项目运行出现了异常: org.springframework.beans.MethodInvocationException: Property 'cacheManager' threw exception; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Caches cannot be added by name when default cache config is not specified in the config. Please add a default cache config in the configuration.

不知道是不是版本的问题。ehcache官方文档2.4版的说要在配置文件中加上一个 defaultcache : http://ehcache.org/documentation/faq#what-does-the-following-error-mean-caches-cannot-be-added-by-name-when-default-cache-config-is-not-specified-in-the-config-please-add-a-default-cache-config-in-the-configuration

jptiancai commented 10 years ago

@hqtc123 试试最新版本的ehcache?