java - 错误:连接 ECONNREFUSED 127.0.0.1:8080(Spring 框架)
问题描述
我正在使用 spring 框架,当我尝试向邮递员注册用户时,我一直在控制台中收到此错误,所以我无法注册用户
POST http://localhost:8080/api/auth/signup
Error: connect ECONNREFUSED 127.0.0.1:8080
Request Headers
Content-Type: application/json
User-Agent: PostmanRuntime/7.25.0
Accept: */*
Postman-Token: c8f92e31-e8f6-40d9-90b0-2bd4faba0552
Host: localhost:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Request Body
{
"username":"TestUserX",
"email":"TestUserX@bla.com",
"password":"password1"
}
解决方案
我的模型中缺少 @Entity 注释,这导致服务器出现故障。另外,我没有正确映射一些变量。原来弹簧注释真的很重要:)
推荐阅读
- django - 如何从 django 中的 views.py 打开模式?有什么办法吗?
- python - 在 python 中使用 selenium 抓取时无法获取 a 标签的 href 值
- angular - 当模型中可能存在 Typescript 类型时,如何处理它们?
- autodesk-forge - 伪造查看器以加载文件
- flutter - ChangeNotifierProxyProvider to act as a Selector rather than Consumer
- javascript - Cordova window.print 不适用于通过 inappbrowser 加载的页面
- asp.net - 即使在 Web 配置中设置 60 分钟后,会话超时也过于频繁
- android - 左右两个标题按钮 React Navigation v5
- javascript - TypeError:无法在 App React 路由器上读取未定义的属性“参数”
- certificate - 将 signingCertificateV2 属性添加到 SignedCms