Spring Boot Architecture and Components
Spring Boot Architecture and Components
Spring Boot Architecture and Components
Architecture:
● Layered Architecture: Spring Boot promotes a layered approach, typically consisting of:
○ Presentation Layer: Handles HTTP requests, translates JSON, performs
authentication, and interacts with the business layer.
○ Business Layer: Contains core business logic, service classes, authorization, and
validation.
○ Persistence Layer: Interacts with databases for data storage and retrieval (often
using Spring Data).
● Auto-Configuration: Spring Boot automatically configures common beans and
dependencies based on annotations and classpath settings, reducing boilerplate
configuration.
Key Components:
● Spring Boot Starters: Convenient dependency descriptors that group related libraries
and auto-configuration for common features (e.g., web, data, testing).
● Spring Boot CLI (Command Line Interface): Tool for running and testing Spring Boot
applications from the command line.
● Spring Boot Actuator: Provides production-ready features like health checks, metrics,
and monitoring endpoints.
● Embedded Servlet Container: Spring Boot can embed a web server (Tomcat, Jetty, or
Undertow) for standalone applications, eliminating the need for external deployment.
● Spring Boot Starter Parent: Parent POM that manages common dependencies and
plugin versions for Spring Boot projects.
Internals:
● Spring Core: Foundation for dependency injection, IoC container, and other core Spring