SpringMVC错误②
问题描述:找不到controller
Did not find handler method for [/login.action] WARN [http-
bio-8080-exec-7] - No mapping found for HTTP request with URI
[/SpringMVC_Mybatis2/login.action] in DispatcherServlet with name 'springmvc'DEBUG
[http-bio-8080-exec-7]
如下所示错误:
问题分析:首先检查SpringMVC配置文件,看看有没有对controller进行扫描。我这一步
没问题,后来发现在controller中少加了一个注解,加上成功解决。
如下图: