context:include-filter標籤的type屬性解析

 Spring容器配置中,自動組件掃描配置中<context:include-filter>標籤的type屬性解析

<context:component-scan base-package="com.test">
		<context:include-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
</context:component-scan>

圖片

其中type有annotation,aspectj,assignable,custom,regex幾種類型。

其意義如下: 

 

annotation:註解類型
assignable_type:annotation:指定的類型
aspectj:按照Aspectj的表達式,基本上不會用到
regex:按照正則表達式
custom:自定義規則

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章