英文:
HTTP Status 404 – Not Found -hibernate-spring mvc--
问题
我刚刚创建了一个简单的Spring MVC Web应用程序,但在运行服务器时出现了404错误这里是错误图像,我已经将整个项目上传到了GitHub Git链接,请检查一下,任何帮助都将不胜感激。
英文:
I have just created a simple Spring MVC web application while I am running in a server I am getting 404 here is the error image
and this I have uploaded my enter project in github git link and please check it and any help is appreciated
>
答案1
得分: 0
它正在查找您的webcontent文件夹中的index.html,但很遗憾那里没有这个文件。
您在控制器上使用了类级路径
@RestController
@RequestMapping("/customers")
请尝试使用 /paperpay/customers
。
英文:
It is looking for index.html in your webcontent folder which is unfortunately not there.
You have used class level path on your controller
@RestController
@RequestMapping("/customers")
Try /paperpay/customers
答案2
得分: 0
你需要输入类似 http://localhost:8080/customers/ 的URL,而不是 http://localhost:8080/paperpay/,因为你的控制器映射是 customers,而不是 paperpay。
英文:
you need to type URL like http://localhost:8080/customers/ instead of http://localhost:8080/paperpay/ because of your controller mapping customers, not paperpay.
专注分享java语言的经验与见解,让所有开发者获益!
评论