on-internet
← Community

org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused: connect

Stack Overflow ·

I'm new to spring-boot and I'm testing spring-boot application using http API, but I got connection error. GET http://localhost:8080/api/helloworld org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused: connect // HelloWorldController.java import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloWorldController { @GetMap

Comments

Sign in or sign up to comment and upvote.

No comments yet.