grails-3.3ehcache-3

grails ehcache - no configuration found


Grails 3.3.1 ehcache 3.0.0.M1

Since I am not able to create properly running caches programmatically, I try to create it via xml. But I don't know where to put the file. Every time I start the application the log output is like this:

2018-07-02 12:21:21.168 WARN --- [ main] n.s.ehcache.config.ConfigurationFactory : No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/user/.gradle/caches/modules-2/files-2.1/net.sf.ehcache/ehcache/2.10.4/9022b1eedfafa11039597b1c1918c1abe414df93/ehcache-2.10.4.jar!/ehcache-failsafe.xml

these are my yml settings:

grails:
    cache:
        ehcache:
            ehcacheXmlLocation: 'classpath:ehcacheCustom.xml'
            lockTimeout: 200

So in which folder should I put my ehcacheCustom.xml?

Thanks for suggestions or working examples


Solution

  • I put the xml file into grails-app/conf/ehcacheCustom.xml and my application.yml was like this:

    grails: cache: ehcache: ehcacheXmlLocation: 'ehcacheCustom.xml' lockTimeout: 200