今天google了一下,StackFlowOver是这样说的:
在spring-servlet.xml中我们include component-scan for controller package:
在applicationcontext.xml中我们add filter for remaining package excluding controller:
Spring中,You have to scan @Controller
beans in servlet context (required by Spring MVC).