两段代码贴出来
<!-- 扫描的包路径 去掉Controller注解 -->
<context:component-scan base-package="com.yuxuan66.yxbaseframe">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!-- 只扫描Controller 注解 -->
<context:component-scan base-package="com.yuxuan66.yxbaseframe"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
<context:include-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan>
这两项配置到底有什么用? 有什么好处?