The prefix "tx" for element "tx:advice" is not bound
这个错误的原因很简单是:
我们在定义申明AOP的时候。。没有加载schema。
具体表现如下:
<beans>
<tx:advice transaction-manager="transactionManager">
<tx:attributes>
<tx:method read-only="true"/>
<tx:method propagation="REQUIRES_NEW" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
<!-- aop代理设置-->
<aop:config proxy-target-class="true">
....
</aop:config>
</beans>
这时会抛出异常不认<TX>标签。。起先还以为是没有加载JAR包呢。。
后来读AOP文档才发现<beans>中要加入“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址
配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="">
这些才是最关键的地方。。后面的配置不变。。。。
from:http://blog.163.com/wex660@126/blog/static/2415306520089785253813/
分享到:
相关推荐
Name salesDataSource is not bound in this Context,连接池的问题
配置tomcat7sqlserver数据连接池java 利用数据源对象建立数据库连接时的错误: Name jdbc is not bound in this Context 解决方案
No Hibernate Session bound to thread,没有绑定线程解决办法,找了好久才找到的
UIUC Math 482: Linear Programming. Lecture 33: The Branch-and-Bound Method(课程讲义)
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
发现在客户的某个PHP版本下,执行某类操作的时候,总是会报如下错误 Invalid parameter number: no parameters were bound,经google,发现是php版本过低导致
Competitive Programming 3 The New Lower Bound of Programming Contests
这是每一个有竞争力的程序员都必须阅读和掌握的书,至少在他们编程生涯的中期。
Written by Canon Explorer of Light Rick Sammon and leading fashion and studio photographer Vered Koshlano, this guide is packed with professional advice on the essential element of photography: ...
Written by Canon Explorer of Light Rick Sammon and leading fashion and studio photographer Vered Koshlano, this guide is packed with professional advice on the essential element of photography: ...
主要介绍了MyBatis绑定错误提示BindingException:Invalid bound statement (not found)的解决办法,非常不错,具有参考借鉴价值,需要的的朋友参考下吧
搭建项目时使用了mybatisplus,项目能够正常启动,但在调用mapper方法查询数据库时报Invalid bound statement (not found)错误。本文给大家分享解决方案,感兴趣的朋友跟随小编一起看看吧
The main reason for making a virtual function inline is to place its definition in the class, either for convenience or to document its behavior, e.g., for accessors and mutators. The -inl.h Files...
The Lipschitz Continuous Global Optimizer LGO solver suite serves for the analysis and global solution of general nonlinear programming NLP models The LGO solver system has been developed and ...
This is the CRB caculated for an OFDM system to compair belind channel estimation. CRB is Cramer Rao bound and it is the lowest bound for analyzing the devlopement of algorithms of channel estimation.
population is wheelchair-bound, the strain of travel is such that more than twice that amount relies on wheelchairs in airports [Haseltine Systems Corp. 2006]. Two issues have the greatest impact on ...
What is the Cramer-Rao Lower Bound
IMPORTANT - READ CAREFULLY: This End-User License Agreement (“EULA”) is a legal agreement between you (either an individual or a single entity) and Microsoft for the Microsoft software product ...