zoukankan      html  css  js  c++  java
  • The prefix "tx" for element "tx:annotationdriven" is not bound.

    出现这个问题怎么解决 

    在 applicationContext.xml中加入如下代码

    但再加入之前,确定你已经加入了 aop支持的jar包 和 annotation jar包 我这里使用的是 spring 3.0 

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
                         http://www.springframework.org/schema/beans/spring-beans-3.0.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">
    <tx:annotation-driven transaction-manager="txManager" />
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        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/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
    <context:annotation-config />
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:p="http://www.springframework.org/schema/p"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

    这样就完成了 事务annotation配置 !

  • 相关阅读:
    pyqt的常用知识点记录
    Ansys采用后处理list Rusult输出位移时负号原因导致不能分列的python解决方法
    matlab调用ANSYS进行分析
    Matlab采用load加载txt文件时显示:错误使用load,无法打开要输出的文件
    Matlab绘制单元,云图
    关于chol分解的置换向量的问题及正定对称稀疏矩阵的构造
    Pr中字幕模糊的问题
    Matlab中文乱码问题
    Qt信号与槽---基于vs2013+qt5
    Microsoft To Do-安卓-Windows-Mac
  • 原文地址:https://www.cnblogs.com/dafa/p/2819005.html
Copyright © 2011-2022 走看看