Spring MVC - No mapping found for HTTP request with URI [duplicate]

喜你入骨 提交于 2019-12-07 12:33:28

Are you sure the package name is correct in this?

<context:component-scan base-package="com.project.web" />

The request mapping path in the controller is relative to your http://your-domain/your-app/. If your app name is welcome use url http://localhost:25001/welcome/welcome or change the requestmapping to @RequestMapping(method = RequestMethod.GET, value="/") so you can use url http://localhost:25001/welcome

Is your hello.jsp directly under WEB-INF/pages? Can you change the Dispatcher Servlet mapping to this and try

<property name="pathSpec" value="*.html"></property>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!