为什么我配置 spring 2.0 配置事务会报错啊?

js512 2009-01-22 05:47:55
...全文
85 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
双艺齐全 2011-08-09
  • 打赏
  • 举报
回复
你可以先参考下这篇文章http://blog.sina.com.cn/s/blog_664afa830100hr6j.html

你配置的是2.0声明式的事务 ,看下头部这里改了没
<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="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
Landor2004 2009-01-23
  • 打赏
  • 举报
回复
报什么错,你的xml的schema是2.0的吗
js512 2009-01-22
  • 打赏
  • 举报
回复
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactoryBean"/>
</property>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager"> ---------------报错啊 <tx:attributes>
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<aop:config> ------------报错啊
<aop:pointcut id="bizMethods" expression="execution(* aptech.biz.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" />
</aop:config>



/**
请高手帮我解答一下啊

*/

51,411

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧