<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" updateCheck="false">
上述行报错如下:
Multiple annotations found at this line: - cvc-elt.1: Cannot find the declaration of element 'ehcache'. - schema_reference.4: Failed to read schema document 'http://ehcache.org/ehcache.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
解决办法(本地引入xsd):
1、在项目里新增文件ehcache.xsd,将文件“http://ehcache.org/ehcache.xsd”内容填入ehcache.xsd里
2、Location:选择这个xsd文件 Key type: Schema location
Key: http://ehcache.org/ehcache.xsd