A Spring Boot web app starts with default settings. On which port does the embedded server listen?
Options
- 8080 (Correct option)
- 80
- 443
- 5432
Answer
8080
Why
The Spring Boot reference says that by default the embedded server listens for HTTP requests on port 8080. The Spring quickstart opens http://localhost:8080/hello.
You can change it with server.port=9090 in application.properties.
For comparison: HTTP normally uses 80 and HTTPS 443.
Remember
Spring Boot default port: 8080.