我正在使用本指南通过spring-boot:link配置couchdb。当此XML配置文件
时出现问题<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:couchdb="http://www.ektorp.org/schema/couchdb"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.ektorp.org/schema/couchdb http://www.ektorp.org/schema/couchdb/couchdb.xsd
">
<couchdb:database name="myDatabase" url="http://localhost:5984"/>
</beans>
无法验证,因为 ektorp XML模式无法读取。当我通过其模式的浏览器链接检查时,没有任何链接,但是在Maven依赖项中有一个确定的链接。但是当我切换这条线
时http://www.ektorp.org/schema/couchdb/couchdb.xsd
进入
classpath:couchdb.xsd
也不会读取它,即使是在一个名称Couchdb.xsd的Maven依赖项中。(您可以在github上检查该文件)。
我如何强制XML读取器查看Maven依赖项以查找正确的模式文件?
这个问题像其他因eclipse的错误而烦人。我刚刚删除了配置文件并再次创建它,但是没有验证 xml架构,一切正常。
P.S。问题中的配置是正确的,无需从本地Maven存储库中摘取XML模式,即从ClassPath。