1. <context:component-scan base-package="com.zcc" use-default-filters="false">
    2. <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    3. </context:component-scan>

    use-default-filters=”false”,设置false,则表示现在不使用默认filter,自己配置filter
    context:include-filter,设置扫描哪些包。


    如果不写use-default-filters=”false”,则表示设置哪些内容不进行扫描。

    <context:component-scan base-package="com.zcc">
            <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    </context:component-scan>