`
83026191
  • 浏览: 45369 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

No configuration found. Configuring ehcache from ehcache-failsafe.xml found in t

阅读更多

如果在/sandh/web-inf/classes下面没有ehcache.xml这个文件,会报这个错误,No configuration found.

Configuring ehcache from ehcache-failsafe.xml found in the classpath:.....这个文件是hibernate缓存配置文

 

<ehcache>
 <diskStore path="java.io.tmpdir"/>
 <defaultCache
    maxElementsInMemory="10000"
    eternal="false"
    timeToIdleSeconds="10000"
    timeToLiveSeconds="10000"
    overflowToDisk="true"
 />
  <cache  name="com.hour41.hibernate.vo.common.City"
    maxElementsInMemory="10000"
    eternal="false"
    timeToIdleSeconds="10000"
    timeToLiveSeconds="10000"
    overflowToDisk="true"
 />
</ehcache>

上面配置了默认类缓存和城市类缓存策略:

<diskStore>表示当内存缓存中对象数量超过类设置内存缓存数量时,将缓存对象写到硬盘,path=”java.io.tmpdir

”表示把数据写到这个目录下。Java.io.tmpdir目录在运行时会根据相对路径生成。
<defaultCache>表示设定缓存的默认数据过期策略。
<cache>表示设定用具体的命名缓存的数据过期策略。
name表示具体的缓存命名。
maxElementsInMemory表示cache中最大允许保存的对象数据量。
eternal表示cache中数据是否为常量。
timeToIdleSeconds表示缓存数据钝化时间
timeToLiveSeconds表示缓存数据的生命时间。
overflowToDisk表示内存不足时,是否启用磁盘缓存。 

 

将上面代码另存为ehcache.xml存放在lib/classes里面即可!

分享到:
评论

相关推荐

    525.125.03-525.125.06-529.11-grid-vgpu-user-guide.pdf

     《Installing and Configuring NVIDIA Virtual GPU Manager》 提供分步指南在支持的管理程序上安装和配置vGPU。  《Using GPU Pass-Through》解释如何配置GPU以通过支持的管理程序。  《Installing the ...

    Service Support-英文原版

    2.1 Configuration Management.............................................................................- 14 - 2.2 Change Management......................................................................

    LTM Config 配置手册打包

    Configuring load balancing pools ..................................................................................... 1-10 Configuring profiles ..........................................................

    Writing Testbenches using System Verilog

    Aligning Signals in Delta-Time . . . . . 201 Clock Multipliers . . 203 Asynchronous Reference Signals . . . 205 Random Generation of Reference Signal Parameters 206 Applying Reset . . . . 208 ...

    Datastage官方培训资料

    2-01 Module 3: Configuring Projects ..................................... 3-01 Module 4: Designing and Running Jobs ........................ 4-01 Module 5: Working with Metadata................

    Manning.Spring.in.Action.4th.Edition.2014.11.epub

    2.5.1. Referencing XML configuration in JavaConfig 2.5.2. Referencing JavaConfig in XML configuration 2.6. Summary Chapter 3. Advanced wiring 3.1. Environments and profiles 3.1.1. Configuring profile ...

    Labview TestStand教程

    Exercise 1-2A Running a Sequence File from the LabVIEW Operator Interface ............................................................................1-20 Exercise 1-2B Running a Sequence File from ...

    spring-boot-reference.pdf

    15.2. Importing XML Configuration 16. Auto-configuration 16.1. Gradually Replacing Auto-configuration 16.2. Disabling Specific Auto-configuration Classes 17. Spring Beans and Dependency Injection 18. ...

    configuring-selinux-policy-report.pdf

    NSA Security-Enhanced Linux (SELinux) is an implementation of a flexible and fine-grained mandatory access control (MAC) architecture called Flask in the Linux kernel[LoscoccoFreenix2001]. SELinux can...

    Introducing.GitHub.A.Non-Technical.Guide

    GitHub has rapidly become the default platform for software development, but it’s also ideal for other text-based documents, from contracts to screenplays. This hands-on book shows you how to use ...

    Git-2.38-64位安装及说明

    3. **选择安装类型**:在安装向导的初始界面,你可以选择“Run Git from the Windows Command Prompt”(推荐)或“Run Git and included Unix tools from the Windows Command Prompt”。前者将Git集成到Windows...

    4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka

    4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka

    cmake-3.25.1-windows-x86-64

    5. **配置生成(Configuring)**:运行`cmake`命令时,会根据CMakeLists.txt生成特定构建工具的配置文件,如Visual Studio解决方案文件或Makefile。 6. **构建(Building)**:配置完成后,使用生成的配置文件进行...

    tmux.2.Productive.Mouse-Free.Development.epub

    Your mouse is slowing you down.... Configuring tmux Chapter 3. Scripting Customized tmux Environments Chapter 4. Working With Text and Buffers Chapter 5. Pair Programming with tmux Chapter 6. Workflows

    WCAdvDeployGuide_zh_CN.pdf

    Configuring Background Method Servers ..........................................................3-3 Configuring RMI for Tunneling over HTTP.......................................................3-8

    Spring Cloud Finchley.SR1-Spring Cloud 手册-Spring Cloud 文档

    - **Configuring ReadTimeouts**:配置读取超时。 - **Security**:配置客户端安全性。 这些知识点贯穿了整个Spring Cloud系统,提供了微服务架构下服务注册、配置管理、服务发现等核心功能的实现方法。通过这些...

    Microsoft.Press.MCTS.Self.Paced.Training.Kit.Exam.70.680.Configuring.Windows.7.Oct.2009.rar

    Microsoft.Press.MCTS.Self.Paced.Training.Kit.Exam.70.680.Configuring.Windows.7.Oct.2009.rar

    ubuntu ref

    ### Ubuntu Reference: Key Commands and Concepts ... From managing privileges to configuring the display and network, this guide serves as a handy reference for anyone working with Ubuntu.

Global site tag (gtag.js) - Google Analytics