Springbean声明错误

Springbean声明错误,spring,Spring,applicationContext.xml类似于上面的代码: 那个么,什么样的问题以及如何修正错误呢?谢谢 编辑 schema/beans后面应该有一个新行,如下所示: xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" > 原因是什么?只是位置Anubhava之间的不同,谢谢你的

applicationContext.xml类似于上面的代码:

那个么,什么样的问题以及如何修正错误呢?谢谢

编辑 schema/beans后面应该有一个新行,如下所示:

xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" >

原因是什么?只是位置Anubhava之间的不同,谢谢你的帮助,但我不明白你的答案和我的applicationContext.xml之间有什么不同。@Jameswq:之后你需要在applicationContext.xml中输入新行http://www.springframework.org/schema/beans 为了避免这个错误。所以上面的文字应该在两行,而不是在同一行。非常感谢你,我会尝试它后,告诉你的结果。早上好!我昨天晚些时候试过了。错误点在“xsi:schemaLocation”的末尾,“spring-beans-2.5.xsd”应该是“spring-beans-2.0.xsd”。当然。jar包的版本是spring 2.0。所以web应用程序正在运行。不管怎样,非常感谢。这是applicationContext.xml的完整内容吗?
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from ServletContext resource [/WEB-INF/classes/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" >