1、Cannot change version of project facet Dynamic web module to 3.0
参考地址: https://www.cnblogs.com/gmq-sh/p/4737130.html
2、 No mapping found for HTTP request with URI [/demo] in DispatcherServlet with name ‘SpringMVC‘
参考地址: https://blog.csdn.net/qq_39966266/article/details/79387262
一般是controller类中注解@RequestMapping映射错误,
http://localhost:8080/demo/ 与 webapp/WEB-INF/welcome.jsp相对应(在web.xml中welcome-file-list配置)
http://localhost:8080/demo/test/getUser?id=1如果没有结果, 看看controller类,test与类的@RequestMapping("/test")相对应,
getUser与方法的@RequestMapping("getUser")相对应,该方法的返回值result与result.jsp相对应,result.jsp在webapp/WEB-INF/jsp/中
原文地址:https://www.cnblogs.com/wushengwuxi/p/9808364.html
时间: 2024-11-09 10:48:27