Java cvc复杂类型.2.4.a:发现以元素';bean:bean';
“{”“:meta,”h中的一个 ttp://www.springframework.org/schema/beans:构造函数参数“:属性“:限定符” g/schema/beans:lookup method“”:替换的方法,应为WC[##其他:“”]} Tomcat向我展示了上述错误 下面给出了我的spring-servlet.xml。我正在使用springframework的.3.11.0发布版本Java cvc复杂类型.2.4.a:发现以元素';bean:bean';,java,spring,servlets,xsd,Java,Spring,Servlets,Xsd,“{”“:meta,”h中的一个 ttp://www.springframework.org/schema/beans:构造函数参数“:属性“:限定符” g/schema/beans:lookup method“”:替换的方法,应为WC[##其他:“”]} Tomcat向我展示了上述错误 下面给出了我的spring-servlet.xml。我正在使用springframework的.3.11.0发布版本 <?xml version="1.0" encoding="UTF-8"?> &
<?xml version="1.0" encoding="UTF-8"?>
<beans:bean xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
<context:component-scan base-package="in.project.*" />
<annotation-driven/>
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/views/"/>
<beans:property name="suffix" value=".jsp"/>
</beans:bean>
</beans:bean>
xml应用程序上下文的根实体是
,而不是
。
所以你可能会以
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
...
</beans:beans>
...
尚未测试,但应能正常工作。希望有帮助