我有我的servlet-context.xml中下面的错误与Spring工具套件:的Spring MVC + MongoDB的
前缀豆元素豆豆不绑定的错误是在 行: http://www.springframework.org/schema/beans/spring-beans-3.0.xsd“>
顺便说一句,我试图用春以下配置连接到MongoDB中:
<?xml version="1.0" encoding="UTF-8"?>
<beans:bean xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-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/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.etvld.mvc" />
<mongo:mongo host="192.168.1.19" port="27017"/>
</beans:beans>
是否有一个特别的原因,你使用的是过时的版本? – chrylis
我只是在尝试Spring.never以前用过它:/ –
然后你会遇到很多不必要的麻烦。看看Spring入门指南和start.spring.io。 – chrylis