struts2 + spring2.5 spring配置出错
applicationContext.xml 配置代码<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
<bean id="loginService" class="com.ss.xy.service.impl.LoginServiceImpl"></bean>
<!--
<bean id="loginAction" class="com.ss.xy.action.LoginAction" scope="prototype">
依赖注入业务逻辑
<property name="loginServiceImpl" ref="loginService" />
</bean>
-->
</beans>
运行:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
什么原因啊 查了下 说法不同
查了2种解决办法 都不行 其他的都是转别人的...
有遇到的没
怎么解决?
搜索更多相关主题的帖子:
spring
----------------解决方案--------------------------------------------------------
也许是包冲突了。看看网上struts2+spring2.5环境所需要的包。
----------------解决方案--------------------------------------------------------
昨天跑的还是好的 今天在运行 就出这个错了
----------------解决方案--------------------------------------------------------