Repaso
Español
Spring, JPA & Java WebFoundationsSPR-42

A Spring Boot web app starts with default settings. On which port does the embedded server listen?

Options

  1. 8080 (Correct option)
  2. 80
  3. 443
  4. 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.

Key terms

Practice this question in Repaso