读书人

spring下水

发布时间: 2012-12-22 12:05:05 作者: rapoo

spring杂碎

1:有时在使用spring组件扫描时需要对某些包过滤,配置如下:

?

<ctx:component-scan base-package="com,edu"><ctx:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/></ctx:component-scan>
?

?

?这样就可以通过exclude-filter把所有@Controller组件过滤掉

?

?

?

读书人网 >编程

热点推荐