0

我正在使用本指南通过 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 依赖项以找到正确的模式文件?

4

1 回答 1

0

这个问题很烦人,就像由于 Eclipse 的错误而发生的其他问题一样。我刚刚删除了配置文件并再次创建了它,但没有验证xml 架构,一切正常。

问题中的 PS 配置是正确的,无需从本地 maven 存储库(即类路径)中提取 xml 模式。

于 2017-10-04T14:36:15.100 回答