<context:component-scan base-package="com.windf">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<context:component-scan base-package="com.whaty">
<context:exclude-filter type="assignable" expression="com.whaty.framework.common.spring.SpringUtil" />
</context:component-scan>
项目开发中遇到两个相同名称的类,在不同的路径下,扫描时过滤掉其中一个,使用expression过滤。
扫描多个路径下的类,直接再写一个<context:component>