亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Spring配置

Spring配置

spring事務配置,tx表達式報錯,求原因和解答
查看完整描述

1 回答

已采納
?
qq_20151109_0

TA貢獻22條經驗 獲得超11個贊

用注解 配上數據源,在加這個就行了<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>

查看完整回答
2 反對 回復 2017-12-18
  • 1 回答
  • 0 關注
  • 1583 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號