Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Grails 3.3 grails ehcache-未找到任何配置_Grails 3.3_Ehcache 3 - Fatal编程技术网

Grails 3.3 grails ehcache-未找到任何配置

Grails 3.3 grails ehcache-未找到任何配置,grails-3.3,ehcache-3,Grails 3.3,Ehcache 3,Grails 3.3.1 ehcache 3.0.0.M1 由于我无法以编程方式创建正常运行的缓存,所以我尝试通过xml创建它。但是我不知道把文件放在哪里。每次启动应用程序时,日志输出如下所示: 2018-07-02 12:21:21.168警告---[main]n.s.ehcache.config.ConfigurationFactory:未找到任何配置。从类路径中的ehcache-failsafe.xml配置ehcache:jar:file:/home/user/.gradle/caches

Grails 3.3.1 ehcache 3.0.0.M1

由于我无法以编程方式创建正常运行的缓存,所以我尝试通过xml创建它。但是我不知道把文件放在哪里。每次启动应用程序时,日志输出如下所示:

2018-07-02 12:21:21.168警告---[main]n.s.ehcache.config.ConfigurationFactory:未找到任何配置。从类路径中的ehcache-failsafe.xml配置ehcache:jar:file:/home/user/.gradle/caches/modules-2/files-2.1/net.sf.ehcache/ehcache/2.10.4/9022b1eedfafafa11039597b1c1918c1abe414df93/ehcache-2.10.4.jar/ehcache-failsafe.xml

以下是我的yml设置:

grails:
    cache:
        ehcache:
            ehcacheXmlLocation: 'classpath:ehcacheCustom.xml'
            lockTimeout: 200
那么我应该把我的
ehcacheCustom.xml
放在哪个文件夹中呢


感谢您的建议或工作示例

我将xml文件放入
grails app/conf/ehcacheCustom.xml中,我的application.yml如下所示:

grails:
隐藏物:
ehcache:
ehcachexmlclocation:'ehcacheCustom.xml'

锁超时:200

解决方案:我将xml文件放入grails app/conf,我的yml配置如下:
grails:cache:ehcache:ehcacheXmlLocation:'ehcacheCustom.xml'锁超时:200