jboot是怎么使用Ehcache的?
时间: 2018-03-21来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>>
我使用jboot+shiro部署了一个程序,ehcache.xml中设置了cacheName为myCache的缓存:

jboot启动项里面也添加了ehcache插件,指定地址为class目录下ehcache.xml

然后使用CacheKit.put加入缓存

加入缓存的时候日志打印warn:
Could not find cache config [myCache], using default.
然后这个缓存只能持续一分钟的样子,一分钟以后就没有缓存了。
我觉得应该是没有关联到ehcache.xml文件或者jar有冲突,因为shiro里面加了shiro-ehcache包
pom.xml如下
<dependency>
<groupId>io.jboot</groupId>
<artifactId>jboot</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.xiaoleilu</groupId>
<artifactId>hutool-all</artifactId>
<version>3.2.0</version>
</dependency>

<!--
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-quartz</artifactId>
<version>1.4.0</version>
</dependency> -->

<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>1.4.0</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.11</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.8.9</version>
</dependency>

<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
大神们,能帮忙看看是哪里的问题吗?

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行