`
入云涛
  • 浏览: 154287 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

配置Spring EhCacheManagerFactoryBean关于ehcache.xml的问题

    博客分类:
  • j2ee
阅读更多
今天忽然遇到了一个问题,在junit测试的时候,我的ehcache.xml配置是没有问题的,当我在web中使用的时候就出现找不到的原因,查询了些资料,比较少,都没有知道找到合适的,看到一则关于配置spring页面映射的时候才看到下列代码
public void init(ServletConfig servletConfig) throws ServletException {
		ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servletConfig.getServletContext());
		AllContext.init(ctx);
	}
这样就把上面的配置到web.xml中,就可以了,也恍然大悟,那怪我的defaultCacheManager找不到chcache.xml了,原来于此有关,特此记下,以免下次遇到相关的问题可以得到解决。
分享到:
评论

相关推荐

    ehcache.xsd_ehcache.xml代码提示.rar

    软件介绍: 已测试有效的ehcache.xsd文件,引入ide中,进行ehcache.xml的代码提示。Windows外壳公用DLL文件,大小23.1KB。

    ehcache.xml 文件

    ehcache.xml 文件

    ehcache的配置参数详解

    hibernate ehcache.xml 配置详解

    ehcache.xml

    ehcache.xml

    shiro-ehcache.xml

    在maven项目中,此shiro-ehcache.xml配置文件放在resources下,在applicationContext.xml中,用于shiro缓存管理器所配置,然后给shiro安全管理器配置此缓存管理器

    ehcache.xsd文件

    用于引入ide中,进行ehcache.xml的代码提示。本人已亲测有效。

    mybatis ehcache 1.0 ehcache.xsd 提示文件

    mybatis 第三方二级缓存,ehcache 配置文件的 约束文件 ehcache.xsd !!

    ehcache-core-2.6.5.jar和mybatis-ehcache-1.0.2.jar

    ehcache.xml配置内容 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"> <diskStore path="java.io.tmpdir"/> eternal=...

    借助Ehcache缓存框架实现对页面的缓存Demo

    1、ehcache.xml和ehcache.xsd两个文件可以在下在下载下来的名为“ehcache-core-x.x.x-distribution.tar.gz”压缩文件中找到 2、由于要实现Ehcache缓存页面,所以必须要添加“ehcache-web-2.0.4.jar” jar包,该jar包...

    java web项目里ehcache.xml介绍

    java web项目里ehcache.xml介绍,需要的朋友可以参考一下

    ehcache-2.10.5.zip

    ehcache.xml 和 ehcache.xsd 版本是 ...在ehcache.xml 与 ehcache.xsd 放在同一目录下 配置如下 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd">

    ehcache.xsd

    在springboot上配置ehcache时用到的xld文件,在编写xml时会报找不到ehcache.xsd文件,把这个文件放到resources目录底下即可

    ehcahe页面缓存详细内容

    2.将ehcache.xml放入能加载到classpath中的任意包中,不能放入WEB-INF中(其详细配置参数代表含义已经注释) 3.在工程中web.xml配置过滤器 <filter-name>SimplePageCachingFilter <filter-class>...

    ehcache.jar

    ehcache.jar 用于缓存机制的加入。ehcache.jar 用于缓存机制的加入。

    springmodules-cache.xsd&springmodules-ehcache.xsd.rar

    解决web.xml中 <page-encoding>UTF-8报错。错误提示: cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun....

    Spring Boot 整合 Ehcache.md

    springboot整合Encache,这篇文章是看松哥整理的。不积硅步无以至千里,加油,一起学习。

    Java缓存框架 Ehcache.zip

    EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。 下图是 Ehcache 在应用程序中的位置: 主要的特性有: 1. 快速.2. 简单.3. 多种缓存策略4. 缓存数据有两级:...

    springboot 整合ehcache+redis 通过配置文件切换缓存类型

    ehcache :添加依赖 pom.xml 2、添加配置文件ehcache.xml 3、添加注解@EnableCaching @Cacheable 4、插入缓存 5 读取缓存 6 设置缓存过期时间ehcache.xml -->timeToLiveSeconds。 redis : 1、添加依赖 pom.xml 2、...

    Hibernate_EHcache.doc

    Hibernate_EHcache.docHibernate_EHcache.doc

Global site tag (gtag.js) - Google Analytics