Sitemap

Member-only story

What Does the Embedded Apache Tomcat Server Actually Do in a Spring Boot Application?

Ever wondered how your Spring Boot application receives HTTP requests without you installing or configuring a web server? Let’s understand what happens behind the scenes.

6 min read5 days ago

--

Press enter or click to view image in full size

If you’ve worked with Spring Boot, you’ve probably written something like this:

@RestController
@RequestMapping("/api")
public class HelloController {
@GetMapping("/hello")
public String hello() {
return "Hello, Spring Boot!";
}
}

Then you start your application:

mvn spring-boot:run

And suddenly, your API is accessible at:

http://localhost:8080/api/hello

But here’s an interesting question:

Who is actually listening on port 8080 and receiving your HTTP requests?

Is it Spring Boot? Is it Spring MVC? Or is there something else working behind the scenes?

The answer, in a typical Spring Boot web application, is Embedded Apache Tomcat.

Let’s understand what it does, why Spring Boot needs it, and how everything works together.

--

--

Ritansh Bagal
Ritansh Bagal

Written by Ritansh Bagal

Software Developer | Writing about Java, Spring Boot, AWS, Kubernetes, distributed systems, and practical backend engineering.