HTTP状态404 – 未找到 – Hibernate-Spring MVC –

huangapple 未分类评论45阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年4月9日 03:04:53
  • 转载请务必保留本文链接:https://java.coder-hub.com/61108141.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定