问题描述
- 关于spring配置问错的问题
-
本地部署了没问题,放到服务器上报
cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明。这是applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" 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-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <context:component-scan base-package="com.nkstar.pxbm.service" /> <!-- Transaction Support --> <tx:annotation-driven transaction-manager="transactionManager" /> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="SpringContextUtil" class="com.nkstar.util.SpringContextUtil"/> </beans>
解决方案
http://blog.csdn.net/mydeman/article/details/9374621
http://aokunsang.iteye.com/blog/1279322
解决方案二:
spring版本不是3.0或者缺少jar
解决方案三:
配置应该没问题,不知道你报的是什么错误,最好把报的错误贴出来,还有你引用的jar包也贴出来,不然很难分析是什么错误
解决方案四:
多来点大神啊 别沉啊
时间: 2024-08-10 16:03:37