1. 程式人生 > >三大框架整合開發的時候,出現紅色雙箭頭,advised by org.springframework.transaction.interceptor.TransactionInterceptor.in

三大框架整合開發的時候,出現紅色雙箭頭,advised by org.springframework.transaction.interceptor.TransactionInterceptor.in

Spring+Struts2+Hibernate三大框架整合開發的時候,老是出現紅色雙箭頭;還有各種如下的提示資訊

Multiple markers at this line
    - Method breakpoint:GoodsServiceImpl [entry] - getGoodsList()
    - advised by
     org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
    - implements cn.com.dao.GoodsService.getGoodsList

org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)



原因:ssh註解開發,applicationContext.xml檔案中配置的元件掃描中少了一段程式碼:

 use-default-filters="false"

例如:<context:component-scan base-package="com.com.dao"/>

改為:<context:component-scan base-package="com.com.dao"  use-default-filters="false"/>

但是這樣的話,之前的檔案就不會被掃描到,雖然不報這個錯誤了,也失去了原本的意義