**java.net.ConnectException: Connection refused: connect**

原因

微服务中,我依赖的那个服务没有启动(QAQ !!! 从昨晚开始到现在,我也是对自己无语了,最怕开始遇到坑,结果还是坑了自己)

java 复制代码
2024-01-22 20:47:48.705 ERROR 25196 --- [nio-9100-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://127.0.0.1:9000/product/query/1": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect] with root cause

java.net.ConnectException: Connection refused: connect
	at java.base/java.net.PlainSocketImpl.connect0(Native Method) ~[na:na]
	at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101) ~[na:na]
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) ~[na:na]
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) ~[na:na]
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:608) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:557) ~[na:na]
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) ~[na:na]
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:508) ~[na:na]
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:603) ~[na:na]
	at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:276) ~[na:na]
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:375) ~[na:na]
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:396) ~[na:na]
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) ~[na:na]
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) ~[na:na]
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) ~[na:na]
	at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) ~[na:na]
	at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:76) ~[spring-web-5.1.8.RELEASE.jar:5.1.8.RELEASE]
相关推荐
ggdpzhk32 分钟前
idea 编辑竖列:alt +shift+insert
java·ide·intellij-idea
hikktn1 小时前
Java 兼容读取WPS和Office图片,结合EasyExcel读取单元格信息
java·开发语言·wps
迪迦不喝可乐1 小时前
软考 高级 架构师 第十一章 面向对象分析 设计模式
java·设计模式
檀越剑指大厂2 小时前
【Java基础】使用Apache POI和Spring Boot实现Excel文件上传和解析功能
java·spring boot·apache
苹果酱05672 小时前
Golang的网络流量分配策略
java·spring boot·毕业设计·layui·课程设计
小青柑-2 小时前
Go语言中的接收器(Receiver)详解
开发语言·后端·golang
豪宇刘2 小时前
JavaScript 延迟加载的方法
开发语言·javascript
孑么2 小时前
GDPU Android移动应用 重点习题集
android·xml·java·okhttp·kotlin·android studio·webview
摇光933 小时前
js迭代器模式
开发语言·javascript·迭代器模式
未命名冀3 小时前
微服务面试相关
java·微服务·面试