簡體   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