spring context 扫描与 mvc扫描类 界别开包
spring context 扫描与 mvc扫描类 区分开包
1.applicationContext.xml
<!--注解说明 -->
<context:annotation-config />
<!-- 把标记了@Controller注解的类转换为bean -->
<context:component-scan base-package="cn.godzilla" >
<context:exclude-filter type="regex" expression="cn.godzilla.web.*"/>
</context:component-scan>
2.springmvc-servlet.xml
<!--注解说明 -->
<context:annotation-config />
<!-- 把标记了@Controller注解的类转换为bean -->
<context:component-scan base-package="cn.godzilla" >
<context:include-filter type="regex" expression="cn.godzilla.web.*"/>
</context:component-scan>
1.applicationContext.xml
<!--注解说明 -->
<context:annotation-config />
<!-- 把标记了@Controller注解的类转换为bean -->
<context:component-scan base-package="cn.godzilla" >
<context:exclude-filter type="regex" expression="cn.godzilla.web.*"/>
</context:component-scan>
2.springmvc-servlet.xml
<!--注解说明 -->
<context:annotation-config />
<!-- 把标记了@Controller注解的类转换为bean -->
<context:component-scan base-package="cn.godzilla" >
<context:include-filter type="regex" expression="cn.godzilla.web.*"/>
</context:component-scan>