1. 程式人生 > >三大框架開發時,spring配置檔案出現org.springframework.transaction.interceptor.TransactionInterceptor.invoke異常

三大框架開發時,spring配置檔案出現org.springframework.transaction.interceptor.TransactionInterceptor.invoke異常

在最近利用三大框架進行專案開發時,spring配置檔案裡出現了一個橘黃色的雙向箭頭,滑鼠放上去,會提示你advised by
 org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)異常,提示spring事務管理異常,經過我的探索,終於解決了這個問題,原因是我利用三大框架的註解開發,在spring配置檔案裡配置全域性的包掃描<context:component-scan base-package="我的包名" ></context:component-scan>,提示的是這一局的異常,解決其實很簡單,只需要在這一句話後面新增一個use-default-filters="false">就可以了,變成
<context:component-scan base-package="我的包名" use-default-filters="false"></context:component-scan>,這樣雙向箭頭就消失了,異常也就消失了