繁体   English   中英

提供 ehcache.xml 位置的 JVM 参数

[英]JVM argument to provide ehcache.xml location

我正在寻找一种方法来为我的 Web 应用程序提供 ehcache.xml 的外部位置,我已经尝试将 ehcache.xml 放在几个位置但没有被选中,证据是:

WARN  net.sf.ehcache.config.ConfigurationFactory  - No configuration found. Configuring ehcache from 
ehcache-failsafe.xml  found in the classpath: bundleresource://someid/ehcache-failsafe.xml

我尝试了maven项目的WEB-INF文件夹和resources文件夹。

但是没有人知道通过JVM参数提供它的方法吗?

如果您的应用程序使用 Hibernate 作为 ORM 框架,则可以通过 .cfg.xml 文件配置Ehcache配置文件。

<property name="net.sf.ehcache.configurationResourceName">file:////path-to-ehcache.xml</property>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM