去除Multiple markers at this line - advised by提示

使用eclipse編程的過程中,總是出現如下箭頭提示,自身有些強迫症,想去除這些提示。

Multiple markers at this line
- advised by
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
- implements simcs.web.httpService.WarehouseService.WarehouseApiService.increaseWarehouse
在這裏插入圖片描述

去網上搜了下,有人說是因爲springMVC配置掃描包時的配置問題,例如:
<context:component-scan base-package="com.ssm.user" use-default-filters="false">

		<context:include-filter type="annotation"  expression="org.springframework.stereotype.Controller"/>

</context:component-scan>
如果去掉 use-default-filters=“false” 這段代碼即可去除提示信息,可這樣的話掃描包會出現問題,系統就會報錯。
簡單說一下 use-default-filters=“false” 這段代碼的意思,翻譯過來就是 “使用默認的過濾器”,如果 use-default-filters=“false” 時,既表示不使用默認的filters(包括@Controller、@Service等);如果 use-default-filters=“true” 時,既表示使用默認的filters;默認情況下(不添加這段代碼),即爲true。
所以這個提示內容還是不能通過去除這段代碼來去除,後來我偷了個懶通過eclipse的設置去除了這些提示:

在這裏插入圖片描述
在這裏插入圖片描述

這個方法是從eclipse的提示信息配置中去除了該提示信息。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章