开启组件扫描细节配置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"><!--示例1use-default-filters="false" 表示现在不使用默认filter,自己配置filtercontext:include-filter,设置扫描哪些内容--><context:component-scan base-package="com.atguigu" use-default-filters="false"><context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/></context:component-scan><!--示例2下面配置扫描包所有内容context:exclude-filter:设置哪些内容不进行扫描--><context:component-scan base-package="com.atguigu" ><context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/></context:component-scan></beans>