springmvc 异常org.springframework.web.servlet.DispatcherServlet noHandlerFound

由于之前用的都是注解方式配置Controller,在springmvc.xml中配置的处理器适配器为:

<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" />

之后才用配置bean方式配置,在springmvc.xml中配置的处理器适配器需改成

<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />

猜你喜欢

转载自blog.csdn.net/wang037195/article/details/83147204