spring mvc关于不能注册controller问题

<!-- 把标记了@Controller注解的类转换为bean -->

<context:component-scan base-package="com.xilei.edu">

<!-- 扫描核心层controller -->

<context:include-filter type="regex"

expression="com.xilei.edu.core.controller" />

<!-- 扫描业务层controller -->

<context:include-filter type="regex"

expression="com.xilei.edu.web.controller" />

</context:component-scan>

 

采用这种方式配置

你可能感兴趣的:(spring mvc)