错误:连接 ECONNREFUSED 127.0.0.1:8080(Spring 框架) [英] Error: connect ECONNREFUSED 127.0.0.1:8080 (Spring Framework)
本文介绍了错误:连接 ECONNREFUSED 127.0.0.1:8080(Spring 框架)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 spring 框架,当我尝试向邮递员注册用户时,我不断在控制台中收到此错误,因此无法注册用户
I'm using the spring framework and when I try to register a user with postman I keep getting this error in the console, so I cannot register a user
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 注释,这导致服务器出现故障.另外,我没有正确映射一些变量.事实证明 spring 注释非常重要:)
Missing an @Entity annotation in my models and this was causing a failure in the server. Also, I hadn't properly mapped some variables.Turns out spring annotations are really important :)
这篇关于错误:连接 ECONNREFUSED 127.0.0.1:8080(Spring 框架)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文