Spring配置

http://img1.mukewang.com/5a368625000132c111020346.jpg

spring事务配置,tx表达式报错,求原因和解答

精慕门2098675
浏览 1469回答 1
1回答

qq_20151109_0

用注解 配上数据源,在加这个就行了<tx:annotation-driven transaction-manager="txManager" />不用注解:就这样<!-- 通知 --><tx:advice id="txAdvice" transaction-manager="transactionManager">   <tx:attributes>      <!-- 传播行为 -->      <tx:method name="find*" propagation="REQUIRED" />      <tx:method name="do*" propagation="REQUIRED" />      <tx:method name="*" propagation="SUPPORTS" read-only="true" />   </tx:attributes></tx:advice><!-- 切面 --><aop:config>   <aop:advisor advice-ref="txAdvice"      pointcut="execution(* 写上你的包路径.*.*(..))" /></aop:config>
打开App,查看更多内容
随时随地看视频慕课网APP