关于spring配置问错的问题

问题描述

关于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

关于spring配置问错的问题的相关文章

spring配置多数据源t junit测试报错

问题描述 spring配置多数据源t junit测试报错 Error creating bean with name 'seentao.workflow.engine.EngineTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: publi

spring配置xml文件classnotfound报错

问题描述 spring配置xml文件classnotfound报错 ApplicationContext ctx=new ClassPathXmlApplicationContext("WebContentWEB-INFspring.xml"); 也用了FileSystemXmlApplicationContext(),输入绝对路径, 但都是java.lang.ClassNotFoundException报错 解决方案 代码报错多贴一些,看看到底是哪个类找不到,这么贴看不出来啥 解决方

图片-加入biz层后,配置spring一直报错,求大神解决

问题描述 加入biz层后,配置spring一直报错,求大神解决

spring mvc-springmvc 和velocity 配置 报错 VelocityEngineFactory NoClassDefFoundError

问题描述 springmvc 和velocity 配置 报错 VelocityEngineFactory NoClassDefFoundError spring 4.1.6.RELEASE maven方式. 报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountController': Injection of autowired dependenc

spring.net 泛型配置报错问题

问题描述 spring.net 泛型配置报错问题 我在一个类里定义了两个泛型对角如下: public class UserController : Controller { // // GET: /User/ BaseService<MDL.User_Test_T> user_test_t { set; get; } BaseService<MDL.Role_Info_T> role_info_t { set; get; } } xml 配置如下: <object type=

spring mvc 报错,求解答,各位好心人必有好报。

问题描述 spring mvc 报错,求解答,各位好心人必有好报. 六月 07, 2015 6:55:04 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.sp

spring 配置数据源出问题

问题描述 spring 配置数据源出问题 spring 配置数据源的时候org下面划红线提示<statement>expectedgot 'org' closep:driverClassNamep:username等都报错Attribute p:driverclassname is not allowed here 已经解决,重新装了软件 解决方案 请检查你的 p:driverclassname属性值是否正确

springMVC配置报错,求大神帮忙

问题描述 springMVC配置报错,求大神帮忙 解决方案 解决方案二: 解决方案三: 解决方案四: 解决方案五: No mapping found for HTTP request with URI [/demo/index.html] in DispatcherServlet with name 'spring' 说的很明白了 解决方案六: 建立也demo文件夹,把index.html挪进去. 解决方案七: RequestMapping("/demo/*")试试

bean-关于spring配置的疑问

问题描述 关于spring配置的疑问 dataSource是一个连接池用来获取连接的 id="JdbcBasicTxProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" PROPAGATION_REQUIRED,readOnly 接下来,配置service 发现会报错:Invalid proper