好久没做WEB开发,用SSM出现了:
The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler
原因是我之前只在方法前@RequestMapping,要在类前加@Controller才能被扫描得到
或者在spring-mvc.xml加上:
<!-- 扫描xxx包下所有使用注解的类型 -->
<context:component-scan base-package="com.soecode.lyy.xxxx" />