本文介绍了spring-mongo-1.0.xsd错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误并且无法解决它谷歌搜索也没有成果。请帮忙。

I am getting the following error and not been able to solve it n googling was not fruitful either. please help.

Referenced file contains errors (http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd). For more 
 information, right click on the message in the Problems View and select "Show Details..."

这是我的代码。

<?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:p="http://www.springframework.org/schema/p"
    xmlns:mongo="http://www.springframework.org/schema/data/mongo"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/data/mongo
    http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <!--   replica-set="localhost:27017,localhost:27018" -->
    <context:annotation-config />
    <mongo:repositories base-package="com.kensho.dms.*" />
    <mongo:jmx/>
    <mongo:mongo host="192.168.55.2" port="27017" />
    <mongo:db-factory dbname="kenshodb" mongo-ref="mongo" />
    <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
        <constructor-arg name="mongo" ref="mongo"/>
        <constructor-arg name="databaseName" value="kenshodb"/>
     </bean>
     <bean id="mongoLoggedInUserDAO" class="com.kensho.nosql.MongoUserDAOImpl"  />


</beans>       

我喝了很多东西。我觉得它有一些依赖性问题。请帮助。

I tyried many things. i feel its some dependency problem. Please help.

推荐答案

几天前我遇到了同样的问题,我将1.0更改为1.1然后问题就消失了。看来他们已经改变了xsd文件。

I had the same problem starting several days ago and I changed 1.0 to 1.1 then the problem is gone. It seems they have changed the xsd file.

http://www.springframework.org/schema/data/mongo/spring-mongo-1.1.xsd 

这篇关于spring-mongo-1.0.xsd错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 02:26