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:自定義規則