<!-- 扫描@Controller注解 --> <context:component-scan base-package="com.fq.controller"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" /></context:component-scan>
<!-- 配置扫描注解,不扫描@Controller注解 --> <context:component-scan base-package="com.fq"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan>
<context:include-filter> 可以搜索@Controller标签<context:exclude-filter> 搜索不到@Controller标签
<context:include-filter>和<context:exclude-filter>区别
最新推荐文章于 2021-07-16 13:04:50 发布