How to use local xsd for EhCache with Spring

前端 未结 4 1511
醉话见心
醉话见心 2021-01-12 15:57

We are facing one issue about EhCache and Spring, when we point XSD file in ehcache.xml to http://ehcache.org/ehcache.xsd, everything is ok, our application can startup cor

相关标签:
4条回答
  • 2021-01-12 16:30

    In my case just downloading the file from http://ehcache.org/ehcache.xsd into src/main/resources solves the problem

    cd src/main/resources
    wget http://ehcache.org/ehcache.xsd
    
    0 讨论(0)
  • 2021-01-12 16:35

    usually I set xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd", But this can't work in a offline environment.

    0 讨论(0)
  • 2021-01-12 16:38

    Download ehcache.xsd, put it to the same folder where is your config xml file. modify the xml head like below, notice the classpath prefix:

    <ehcache
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="classpath:ehcache.xsd">
    

    This will work in the development and production environment.

    0 讨论(0)
  • 2021-01-12 16:48

    My Workaround is add this xsd file to absolute path, such as: c:/ehcache.xsd and point to this location in ehcache.xml. Hope this will help someone who facing the same issue.

    Still looking forward to find out other solution.

    Thanks.

    0 讨论(0)
提交回复
热议问题