<tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes>
<tx:method name="*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor pointcut="execution(* com.lxoa.approve.service.*.*(..))" advice-ref="txAdvice"/>
<aop:advisor pointcut="execution(* com.lxoa.sysmanage.service.*.*(..))" advice-ref="txAdvice"/>
</aop:config>
注:com.lxoa.approve.service
有XxxServiceImpl但是不知道为什么有一个测试的例子是好用的,但是不是测试的几个例子确实不好用的呀!
都两天了呀
我觉得这样没有错误呀 !
但是一个测试是好使的,但是过的一会有不好使了,难道这个东西还不稳定吗 ?
还有另外的一个问题就是:
一会报Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker from transaction definition 的这个错误呀 !
一会又不报了!
还不稳定吗~!?
当好用的时候,在这边客户端插入数据的时候,一切都正常,可是sql_show就是没有打出insert语句呀!
到数据库 服务器那边看看数据进入到数据库没有的时候,发现表也打不开了,我怀疑是因为这个事务还没有结束的原因造成的呀!
<tx:method name="*" propagation="REQUIRED"/>
的默认配置不是readOnly=false吗?
应该可以的呀·
谢谢帮助