๐ What is Spring Boot Web?
Spring Boot Web is used to build web applications and RESTful services using Spring Boot.
At its core, it allows developers to:
- Handle HTTP requests
- Expose REST APIs
- Return JSON/XML responses
- Build scalable backend systems
To enable web features, Spring Boot provides the spring-boot-starter-web dependency.
๐ฆ What is inside spring-boot-starter-web?
The spring-boot-starter-web starter bundles everything needed to build web applications:
- spring-boot-starter
- spring-core
- spring-mvc
- jackson (JSON serialization/deserialization)
- spring-boot-starter-tomcat (embedded server)
Because of this starter, developers donโt need to configure servers or JSON handling manually
๐ Understanding REST APIs
REST (Representational State Transfer) is a set of rules and conventions used to design web services.
REST APIs work with resources and standard HTTP methods.
Common REST Endpoints
- GET /users โ Retrieve all users
- GET /users/{id} โ Retrieve a user by ID
- POST /users โ Create a new user
- PUT /users/{id} โ Update an existing user
- PATCH /users/{id} โ Partially update a user
- DELETE /users/{id} โ Delete a user
Each endpoint performs a clear and meaningful operation on a resource.
๐๏ธ Spring Boot MVC Architecture
Spring Boot follows the MVC (ModelโViewโController) architecture, which promotes a clean and organized code structure.
๐น MVC Components
- Controller โ Handles HTTP requests and responses
- Service โ Contains business logic
- Repository โ Interacts with the database
- Entity โ Represents database tables
- DTO โ Transfers data between layers
- Client โ Consumes the REST API
Each layer has a single responsibility, making the application easier to understand and maintain
๐งฑ Layered Architecture in Spring Boot
Spring Boot applications typically follow a layered approach:
๐ก Presentation Layer
- Controllers
- Request handling
- JSON/XML conversion
- Authentication
๐ข Business Layer
- Business logic
- Validation
- Authorization
๐ต Persistence Layer
- Database access
- JPA repositories
- Query handling
๐ด Database
- Actual data storage
This separation ensures clean flow of data across the application.
โ Why Use MVC Architecture?
โ Separation of Concerns
Each layer focuses on a specific responsibility.
โ Testability
Business logic can be tested independently of controllers.
โ Reusability
Services and repositories can be reused across multiple controllers.
โ Scalability
Applications scale better as complexity grows.
๐ Typical Spring Boot Web Project Structure
client
controller
service
repository
dto
entity
This structure is widely used in real-world Spring Boot applications and follows industry best practices.
๐ Final Thoughts
Spring Boot Web, combined with REST APIs and MVC architecture, forms the foundation of modern backend development.
Once these concepts are clear:
- API design becomes easier
- Code becomes cleaner
- Applications become production-ready
This post is part of my learning-in-public journey as I explore Spring Boot and backend development.


Top comments (0)