use-default-filters="false" 需要和 context:include-filter 一起使用,而不能和 context:exclude-filter 属性一起使用。
<!-- 配置自动扫描的包 --> <context:component-scan base-package="com.mybatis.ssm"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan>
参考:https://www.cnblogs.com/crawl/p/7940755.html