.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://localhost/8081:user/1": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect] with root cause java.net.ConnectException: Connection refused: connect

是因为:Servlet.service服务(对于路径为[]的上下文中的servlet[dispatcherServlet],引发了异常[请求处理失败;嵌套异常为java.lang.NullPointerException]有根本原因

原因:

说明是上面url引发的错误(可能url不存在,所跳转的url可能与web项目的root路径(一般是项目名)冲突);

所以检查自己的url是否配对

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐