我正在寻找一种将ehcache.xml的外部位置提供给我的Web应用程序的方法,我已经尝试将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文件夹和资源文件夹。
但是没有人知道通过JVM参数提供它的方法吗?
答案 0 :(得分:0)
如果您的应用程序使用 Hibernate 作为 ORM 框架 Ehcache 配置文件可以通过 .cfg.xml 文件进行配置。
<property name="net.sf.ehcache.configurationResourceName">file:////path-to-ehcache.xml</property>