报错信息如下:
I/O error on GET request for “http://localhost:8081/dept/list”: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
org.springframework.web.client.ResourceAccessException: I/O error on GET request for “http://localhost:8081/dept/list”: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
原因:请求地址不对
端口号应该是服务提供者8001,如下图所示:
修改后访问成功:
I/O error on GET request for “http://localhost:8081/dept/list“: Connection refused: connect; nested
最新推荐文章于 2024-07-23 17:51:12 发布