Fact-checked by Grok 2 weeks ago

Spring Boot

Spring Boot is an open-source framework for the Java platform designed to simplify the development of production-ready Spring-based applications by enabling developers to create stand-alone applications with minimal configuration. It automates much of the typically required in Spring projects through features like auto-configuration, embedded web servers, and starter dependencies. Developed by the team at (now part of ), was first released on April 1, 2014, as version 1.0 GA, building on the foundational that originated in 2003. The framework addresses the complexities of traditional Spring setup by providing opinionated defaults and conventions that reduce development time while maintaining flexibility for customization. Key features of Spring Boot include:
  • Auto-configuration: Automatically configures Spring and third-party libraries based on the dependencies present in the classpath.
  • Starter POMs: Pre-configured dependency descriptors for Maven or Gradle that simplify project setup for common use cases like web applications or data access.
  • Embedded Servers: Built-in support for servers such as Tomcat, Jetty, or Undertow, allowing applications to run without external deployment.
  • Production-Ready Tools: Integrated monitoring, metrics, health checks, and externalized configuration to support deployment in production environments.
  • Spring Boot Actuator: Provides endpoints for introspection and management of running applications.
As of November 2025, the latest stable release is Spring Boot 3.5.7, which supports modern Java versions including 21 and integrates with the latest 6.x for enhanced performance and cloud-native capabilities. Spring Boot has become a cornerstone for architecture, facilitating and scalable enterprise applications within the broader Spring ecosystem.

Overview

Definition and Purpose

Spring Boot is an extension of the Spring Framework that facilitates rapid application development by emphasizing conventions over configuration, enabling developers to build applications with reduced boilerplate code and explicit setup requirements. This approach allows for quicker prototyping and iteration while maintaining the flexibility and power of the underlying Spring ecosystem. The primary purpose of Spring Boot is to streamline the creation of stand-alone, production-grade Spring-based applications that can be run directly with minimal configuration, incorporating essential non-functional features out of the box. By automating much of the initial setup, it shifts developer focus toward rather than infrastructure concerns, such as wiring dependencies or configuring servers. Among its key benefits are simplified dependency management via curated "starter" packages, automatic embedding of web servers like for self-contained execution, and streamlined deployment through executable files that eliminate the need for external application servers. These elements collectively reduce development time and operational overhead, making it particularly suitable for and cloud-native environments. Spring Boot's first stable version, 1.0, was released in April 2014 by , a company that has since been acquired by in 2020.

History and Development

Spring Boot originated in 2013 at , a joint venture formed by , , and , as an effort led by Phil Webb and a team of contributors to address the growing configuration complexity in Spring applications. Inspired by the simplicity of frameworks like and tools such as Dropwizard, the project sought to enable developers to create standalone, production-grade Spring-based applications with minimal setup and . The initial stable release, Spring Boot 1.0, arrived in April 2014, introducing core concepts like auto-configuration to streamline management and embedding. Major followed in March 2018, shifting the baseline to 8 and incorporating support via Spring WebFlux, while enhancing features for monitoring. In November 2022, version 3.0 marked a significant evolution by requiring Java 17 as the minimum version and migrating from Java EE to APIs, alongside initial support for native images to enable faster startup times and reduced memory footprints. Spring Boot's development has been closely tied to the broader Spring ecosystem, including the creation of in 2015—a web-based project generator that allows users to bootstrap applications with selected dependencies and configurations directly from start.spring.io. This tool, maintained as an open-source project, integrates seamlessly with IDEs like and , promoting rapid prototyping and adoption within the Spring community. As of November 2025, Spring Boot is actively maintained by VMware's Spring team, following the 2020 acquisition of Pivotal, with ongoing contributions from a global community via the project's repository, which hosts over 70,000 stars and thousands of issues. The latest milestone release, 4.0.0-RC2 from November 6, 2025, builds on prior innovations like virtual threads—introduced in 3.2 (November 2023) for 21 concurrency—and continues to emphasize native image optimizations for cloud-native deployments.

Core Features

Auto-Configuration

Spring Boot's auto-configuration feature automatically sets up the Spring application context by detecting dependencies on the classpath and applying predefined configurations accordingly. This mechanism eliminates the need for extensive manual boilerplate code, such as XML or explicit Java-based configuration, for common scenarios like web MVC setup or data access layers. For instance, if the HSQLDB JAR is present on the classpath, Spring Boot will automatically configure an in-memory database without requiring developer intervention. The process is initiated by the @EnableAutoConfiguration annotation, typically applied to a @Configuration class, which scans for auto-configuration classes listed in the META-INF/spring.factories file within the spring-boot-autoconfigure . These classes use conditional annotations, such as @ConditionalOnClass or @ConditionalOnMissingBean, to determine whether specific should be created; for example, if a dependency like is detected, an embedded Tomcat instance is provisioned only if no custom exists. This conditional logic ensures that auto-configuration is non-intrusive, allowing developers to override defaults by providing their own —such as defining a custom , which would then disable the embedded support. One key benefit of auto-configuration is its ability to streamline by inferring and applying sensible defaults based on project dependencies, thereby reducing setup time and potential errors in configuration. It promotes a convention-over-configuration approach, where the guesses and configures beans likely needed for the application's , such as filters or JPA repositories when relevant libraries are included. To aid , enabling the --debug flag or setting debug=true in application properties generates detailed logs of the auto-configuration decisions, listing applied, matched, and excluded classes. Developers can exclude specific auto-configurations to customize behavior, using the exclude attribute in the @EnableAutoConfiguration or @SpringBootApplication , or via the spring.autoconfigure.exclude property. For example, to prevent database auto-configuration, one might annotate the main class as follows:
java
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class MyApplication {
    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}
This exclusion targets classes by type or name, even if they are not on the , providing fine-grained control without altering .

Starter Dependencies

Spring Boot starters are a set of convenient descriptors that bundle essential modules and third-party libraries into predefined packages, enabling developers to quickly set up projects for specific use cases without manually managing individual . For instance, the spring-boot-starter-web starter includes MVC for applications, along with as an embedded server and Jackson for processing. These starters follow a consistent , such as spring-boot-starter-*, where the denotes the target functionality, ensuring a one-stop solution for common application needs. To use starters, developers add them as dependencies in their build files. In Maven, this involves declaring the starter within the <dependencies> section of the pom.xml file, for example:
xml
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
No explicit version is typically needed, as it is managed by the Spring Boot parent POM. The spring-boot-starter-parent POM, when set as the parent in Maven projects, imports the spring-boot-dependencies (BOM), which centralizes version management for all included artifacts and ensures compatibility across upgrades. For Gradle, the Spring Boot similarly handles dependency resolution by applying the plugin and declaring starters in the dependencies block, such as implementation 'org.springframework.boot:spring-boot-starter-web'. Spring Boot offers over 50 official starters, categorized broadly into application starters for core functionalities, production starters for operational features, and technical starters for specific technologies. Application starters include spring-boot-starter-web for RESTful web services, spring-boot-starter-data-jpa for JPA-based data access with Hibernate, and spring-boot-starter-security for authentication and authorization. Production starters like spring-boot-starter-actuator provide endpoints for monitoring and metrics, while technical ones such as spring-boot-starter-jetty allow alternatives to the default server. These starters trigger auto-configuration classes based on the , streamlining setup for various application types. The primary advantages of starters lie in their curation, which ensures version compatibility among bundled dependencies and minimizes transitive dependency conflicts that often arise in complex Spring projects. By relying on the BOM for version alignment, developers avoid manual version specification, reducing boilerplate and the risk of runtime errors from mismatched libraries. This approach promotes consistency across projects and facilitates easier maintenance during framework updates.

Embedded Servers

Spring Boot automatically configures an embedded when the spring-boot-starter-web dependency is included in the application's , enabling the application to run as a standalone without requiring an external . This mechanism leverages Spring Boot's auto-configuration feature, which detects the presence of web-related dependencies and initializes the during application startup. By default, the embedded listens on port 8080 for HTTP requests. The framework supports three primary embedded servers: as the default, , and Undertow, each integrated as libraries within the application. To switch from the default to another server, developers exclude the spring-boot-starter-tomcat dependency and include the appropriate alternative, such as spring-boot-starter-jetty for or spring-boot-starter-undertow for Undertow, using build tools like or . For example, in a Maven pom.xml file, this involves adding exclusions and new dependencies to the spring-boot-starter-web entry. These servers are production-ready and handle servlet-based web applications efficiently within the JVM. Configuration of the embedded is managed through application properties, primarily in application.properties or application.yml files. Key properties include server.[port](/page/Port) to specify the listening port (overriding the default 8080) and server.servlet.context-[path](/page/Path) to set the path for the application, such as /myapp. Additional server-specific settings, like sizes or , can be tuned via dedicated properties prefixed with server.[tomcat](/page/Tomcat), server.[jetty](/page/Jetty), or server.undertow. The use of embedded servers eliminates the need for separate server installations, streamlining development workflows by allowing applications to run directly from an IDE or command line with a simple java -jar execution. This approach also facilitates deployment to containerized environments like Docker, where the self-contained JAR file bundles the server and application logic, reducing complexity compared to traditional deployments on external servers.

Configuration Management

Properties Files and YAML

Spring Boot supports externalized configuration through files and files, allowing developers to manage application settings outside the codebase for flexibility across environments. These configurations are loaded automatically during application startup and can override default values provided by auto-configuration. The primary files used are application.properties for simple key-value pairs and application.yml (or application.yaml) for more structured, hierarchical data representation. In the properties format, configurations are defined as flat key-value pairs using the equals sign, such as server.port=8080 to set the embedded server's port or app.name=MyApplication for a custom application identifier. This format is straightforward for basic settings but becomes unwieldy for nested structures. YAML, in contrast, employs indentation-based hierarchy to represent complex data like lists and maps, improving readability; for example:
yaml
server:
  port: 8080
app:
  name: MyApplication
  features:
    - logging
    - security
This allows grouping related properties under prefixes, such as app.features as a list. Both formats are parsed into a unified property map, with supporting multi-document separation via --- if needed. Configuration files follow a specific location hierarchy to determine loading order and precedence, ensuring external files can override internal defaults. The search order starts with the highest precedence locations: a config subdirectory in the current (./config/), followed by the current directory (./), then the config package on the (classpath:/config/), and finally the root (classpath:/). For instance, an application.properties file in ./config/ will override one in ./. Command-line arguments provide the ultimate override, such as running the application with --server.port=9090 to supersede any file-based setting. This hierarchy promotes a "convention over " approach while allowing customization. Properties from these sources are automatically bound to Spring's Environment abstraction, a central interface that aggregates all configuration data into a searchable, hierarchical structure accessible via methods like getProperty("server.port"). This enables runtime access and overrides from multiple sources, including environment variables and system properties, without direct file handling. For more structured usage, Spring Boot facilitates type-safe configuration by mapping properties to Java objects using the @ConfigurationProperties annotation. The @ConfigurationProperties annotation binds properties prefixed with a specified value to a POJO class, converting strings to appropriate types (e.g., integers, booleans) and supporting nested objects, lists, and maps. For example, the following class maps to properties under the app prefix:
java
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.constraints.NotNull;

@ConfigurationProperties(prefix = "app")
@Validated
public class AppProperties {
    @NotNull
    private String name;
    private int maxConnections = 10;
    private List<String> features = new ArrayList<>();

    // Getters and setters
}
This enables injection via @EnableConfigurationProperties or as a bean, with automatic validation using JSR-303 annotations like @NotNull when @Validated is applied. Corresponding YAML might look like:
yaml
app:
  name: MyApplication
  max-connections: 20
  features:
    - logging
    - security
Such binding ensures compile-time safety, reduces boilerplate, and catches configuration errors early through validation exceptions at startup. Starting with Spring Boot 4.0, the @ConfigurationPropertiesSource annotation allows Spring Boot to detect and bind @ConfigurationProperties classes defined in external modules, improving support for modular applications.

Profiles and Environments

Spring Boot profiles enable developers to manage application configurations tailored to specific environments, such as , testing, and , by segregating settings that vary across deployment contexts. This mechanism allows the same to adapt seamlessly to different conditions without requiring code modifications, promoting portability and in and enterprise applications. By default, Spring Boot activates the "default" profile if no others are specified, loading configurations from application.properties or application.yml files. Profiles are activated through multiple channels to accommodate various deployment scenarios. The primary method involves setting the spring.profiles.active property in the base , environment variables (e.g., SPRING_PROFILES_ACTIVE=dev,test), JVM system properties (e.g., -Dspring.profiles.active=prod), or command-line arguments (e.g., --spring.profiles.active=staging). Multiple profiles can be activated simultaneously by comma-separating their names, with higher-precedence profiles overriding properties from lower ones; for instance, activating both "dev" and "local" would merge their configurations while prioritizing "local". This flexibility ensures that environment-specific overrides, such as database connection strings or endpoints, can be applied dynamically during application startup. Profile-specific configuration files follow a naming convention like application-{profile}.properties or application-{profile}.yml, which are loaded alongside the base files and take precedence for matching . For example, application-dev.yml might define a in-memory database URL for , while application-prod.yml specifies a production instance, ensuring the correct settings are used without altering the core application logic. Logging levels can also be profile-dependent, such as setting DEBUG for and WARN for to balance verbosity and . These files support hierarchical overrides, where profile configurations extend and supersede the base introduced in general . The @Profile annotation further integrates profiles into bean definitions, conditionally creating or excluding beans based on active profiles. Applied at the class or method level, it restricts bean instantiation to specified profiles; for instance, @Profile("dev") on a mock bean ensures it loads only in , while a real implementation uses @Profile("prod"). This annotation works in tandem with profile-specific properties to enable comprehensive isolation, such as injecting different data sources via @Profile-annotated configuration classes. Best practices for profiles emphasize and , particularly by externalizing sensitive information like API keys or database credentials from using variables or external vaults rather than embedding them in property files. For distributed systems, Spring Boot integrates with Spring Cloud Config to centralize profile management across multiple services, allowing remote retrieval of configurations from a shared server while supporting profile-based branching. This approach minimizes configuration drift in cloud-native environments and facilitates seamless transitions between profiles during deployments.

Application Bootstrapping

@SpringBootApplication Annotation

The @SpringBootApplication annotation serves as the primary entry point annotation for Spring Boot applications, marking a configuration class that enables key bootstrapping features in a single declaration. It acts as a meta-annotation, combining three essential annotations to streamline application setup: @SpringBootConfiguration, which designates the class as a source of bean definitions equivalent to @Configuration; @EnableAutoConfiguration, which triggers Spring Boot's auto-configuration mechanism to automatically configure beans based on classpath dependencies; and @ComponentScan, which enables scanning for Spring components such as @Component, @Service, @Repository, and @Controller in the base package and its subpackages. This composition reduces boilerplate by defaulting to these behaviors without requiring explicit declarations. In typical usage, the is placed on the main application , which contains the main method to launch the application. By default, it scans the package of the annotated and all subpackages for components, allowing to detect and register them in the application context. For example, the following demonstrates standard placement:
java
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public [class](/page/Class) MyApplication {
    public static void main(String[] args) {
        SpringApplication.run(MyApplication.[class](/page/Class), args);
    }
}
This setup ensures the application is configured, auto-configured, and component-scanned upon startup. The annotation provides several attributes for . The scanBasePackages attribute allows specifying one or more base packages for component scanning beyond the default, enabling broader or targeted discovery of components. For instance, scanBasePackages = {"com.example.base1", "com.example.base2"} would scan those packages explicitly. Additionally, the exclude attribute accepts an array of auto-configuration classes to disable specific configurations, such as excluding DataSourceAutoConfiguration.class to prevent automatic database setup. The related excludeName attribute offers a string-based alternative for excluding classes by name, useful when type references are unavailable. These attributes provide fine-grained control while maintaining the annotation's convenience. Introduced in Spring Boot 1.2 as a convenience meta-annotation to consolidate common bootstrapping annotations, @SpringBootApplication has since become the central annotation for all application entry points, simplifying development across versions. It enables auto-configuration as detailed in Spring Boot's core features, ensuring seamless integration with the framework's opinionated defaults.

Main Method Execution

The standard entry point for a Spring Boot application is the public static void main(String[] args) method, typically placed in a class annotated with @SpringBootApplication. This method invokes SpringApplication.run(MyApplication.class, args) to bootstrap the application, which handles the creation and initialization of the ApplicationContext, loads application beans, and starts any necessary components such as an embedded server. The SpringApplication serves as the core bootstrapper for Spring Boot applications launched from a main() , providing a static run() for simple usage or allowing instantiation for advanced customizations. Developers can create a SpringApplication instance to configure aspects like the web environment via WebApplicationType (e.g., setting it to SERVLET for web apps or NONE for non-web applications) and banners, which display custom or text during startup from resources like banner.txt. For more complex scenarios, such as building context hierarchies, the SpringApplicationBuilder fluent enables chaining configurations, as in new SpringApplicationBuilder().sources(Parent.[class](/page/Class)).child(Application.[class](/page/Class)).run(args). Command-line arguments passed to the main() method are forwarded to SpringApplication.run(), where they populate the application's Environment for property resolution and are made available as an ApplicationArguments bean for programmatic access within the application. This mechanism supports both web and non-web applications, with non-web modes explicitly configurable to avoid web-related bootstrapping. During execution, SpringApplication produces initial logging output at the INFO level, including startup diagnostics such as the process ID (PID), active profiles, and key configuration details to aid in monitoring and debugging the bootstrap process. This output can be customized or suppressed via properties like spring.main.log-startup-info=false.

Traditional Web Deployment

Traditional web deployment for Spring Boot applications involves packaging the application as a Web Application Archive () file and deploying it to an external servlet container, such as or JBoss EAP, rather than relying on an embedded server. This method leverages the SpringBootServletInitializer class, which serves as an opinionated implementation of WebApplicationInitializer to bootstrap the SpringApplication during container startup. To prepare the application for this deployment style, the main application class must extend SpringBootServletInitializer and override its configure method, which returns a SpringApplicationBuilder configured with the application's source class. This override ensures the Spring context is properly initialized when the WAR is loaded by the servlet container. For example, the following code demonstrates the required extension in the main class:
java
@SpringBootApplication
public class MyApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(MyApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}
This setup allows the main class to implement WebApplicationInitializer implicitly through the extension, enabling deployment to compatible external containers. For WAR packaging, the build configuration—typically in Maven's pom.xml or Gradle's build.gradle—must specify the packaging type as "war" and mark servlet container dependencies (e.g., ) as "provided" to avoid bundling them in the archive. The resulting file can then be deployed directly to servlet containers like or JBoss, where the container manages the lifecycle. Upon deployment, the SpringBootServletInitializer automatically registers the DispatcherServlet, which handles incoming requests and routes them to Spring MVC controllers, mirroring traditional behavior but integrated with Boot's auto-configuration. This contrasts with server mode, where the servlet starts within the JVM via the main method. This deployment approach is particularly suited for legacy environments or shared application servers where external containers are mandated.

Advanced Auto-Configuration

Conditional Configuration

Spring Boot provides a set of conditional annotations that allow developers to enable or disable auto-configuration classes and beans based on specific runtime conditions, ensuring that only relevant components are loaded. These annotations are particularly useful for creating modular configurations that adapt to the application's environment, such as the presence of certain classes, properties, or application types. By applying these conditions at the class or method level within @Configuration classes, Spring Boot avoids unnecessary bean creation and potential conflicts. Key conditional annotations include @ConditionalOnClass, which activates the configuration only if a specified class is present on the ; for instance, it can check for a to enable database-related s. @ConditionalOnMissingBean ensures a is created only if no existing of the specified type or name is already defined, preventing overrides of user-provided implementations. @ConditionalOnProperty evaluates based on the value of a configuration property, such as enabling a feature only if a specific key is set to true or matches a expected value. Additionally, @ConditionalOnWebApplication applies configurations solely in environments, distinguishing between servlet-based (using type=Type.SERVLET) and reactive (using type=Type.REACTIVE) applications. These annotations are typically used to decorate entire @Configuration classes or individual @Bean methods, allowing nested configurations for more granular control. For example, a configuration class might use @ConditionalOnClass(SomeDatabaseDriver.class) to conditionally define a DataSource bean, which is only instantiated if no manual DataSource bean has been provided elsewhere via @ConditionalOnMissingBean. In a web-specific case, auto-configuration for MVC components might employ @ConditionalOnWebApplication(type=Type.SERVLET) to set up servlet-related beans, such as dispatchers, only in traditional web applications. The order in which conditional auto-configurations are evaluated can be controlled using annotations like @AutoConfigureOrder, which assigns a integer (lower values execute first, defaulting to 0), or @AutoConfigureBefore and @AutoConfigureAfter to relative to other specific auto-configuration classes. For instance, a custom web configuration might use @AutoConfigureAfter(WebMvcAutoConfiguration.class) to ensure it builds upon the core MVC setup. This ordering mechanism helps resolve dependencies and avoids premature evaluation of conditions that rely on prior configurations. To debug conditional matching, developers can enable the --debug command-line flag when starting the application, which logs detailed reports of evaluated and skipped auto-configurations, including the reasons for each decision. This output, generated via the ConditionEvaluationReport, aids in troubleshooting why certain beans were not created, such as a missing class or mismatched property.

Custom Auto-Configuration Classes

Custom auto-configuration classes enable developers to extend Boot's built-in mechanisms by defining their own conditional beans and settings that activate automatically based on contents or other criteria. These classes are typically annotated with @AutoConfiguration, which combines @[Configuration](/page/Configuration) and indicates the class is an auto-configuration candidate, allowing Boot to load it during the application startup process. To control the loading order relative to other auto-configurations, developers can use annotations such as @AutoConfigureBefore or @AutoConfigureAfter on the class, or specify before and after attributes directly within @AutoConfiguration. For instance, a custom web-related auto-configuration might be ordered to load after WebMvcAutoConfiguration to ensure it builds upon the core MVC setup without conflicts. This ordering mechanism helps maintain a predictable sequence, preventing issues like premature initialization. Discovery of custom auto-configuration classes occurs through a dedicated named META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports, which lists the fully qualified class names of the auto-configurations, one per line. Unlike traditional component scanning, this explicit listing avoids performance overhead and ensures only intended classes are imported via @Import mechanism during context refresh. For example, the file might contain com.example.MyCustomAutoConfiguration to make it available when the JAR is on the . Best practices for implementing these classes emphasize conditionality to handle optional dependencies gracefully. The @ConditionalOnClass annotation, for example, ensures a configuration only activates if a specific class (such as from a third-party library) is present on the , preventing errors in minimal setups. Additionally, Spring Expression Language (SpEL) can be used with @ConditionalOnExpression to enable dynamic bean creation based on property values or runtime conditions, allowing for flexible, environment-aware configurations. Developers should avoid to properties unless necessary, opting instead for relaxed where possible to enhance usability. A representative example is creating a custom starter for integrating a third-party , such as a client. In this setup, the auto-configuration class might conditionally create an HTTP client using @ConditionalOnClass to check for the presence of libraries like Apache HttpClient or OkHttp. If detected, it configures the client with properties prefixed by myapp.[weather](/page/Weather), injecting it into a for the ; otherwise, it falls back to a default or skips creation entirely. This approach allows users to include the starter in their project, with the configuration activating seamlessly without setup. For packaging, custom auto-configurations are distributed as separate files, often as part of a starter module that includes the autoconfigure module containing the classes and the spring.factories (or imports) file. To provide IDE support for property metadata, such as auto-completion in application.yml, integrate the spring-boot-configuration-processor as an annotation processor during compilation. In , this is added to the <annotationProcessorPaths> in the spring-boot-maven-plugin; in , it is declared in the annotationProcessor configuration. This generates spring-configuration-metadata.[json](/page/JSON) in the , enabling tools like to offer enhanced development assistance.

Production Features

Spring Boot Actuator

Spring Boot Actuator is a within the Spring Boot that delivers production-ready features for , managing, and introspecting running applications. It enables developers and operators to gain insights into the internal state of an application through a set of extensible endpoints accessible via HTTP or (JMX). These endpoints facilitate tasks such as checking application health, retrieving configuration details, and auditing events, thereby supporting operational visibility without requiring custom instrumentation code. To incorporate into a Spring Boot project, the spring-boot-starter-actuator must be added to the build , such as in Maven's pom.xml or Gradle's build.gradle file. Once included, automatically exposes a baseline set of , with only /actuator/[health](/page/Health) and /actuator/[info](/page/Info) enabled by default over HTTP to minimize exposure risks. The /actuator/[health](/page/Health) reports the application's overall status as "UP" or "DOWN" based on aggregated checks, while /actuator/[info](/page/Info) allows the display of arbitrary diagnostic information, such as build details or environment-specific messages, configured via . Customization of is achieved primarily through application properties in application.properties or application.yml. For instance, the property management.endpoints.web.exposure.include=* exposes all available endpoints over HTTP, enabling comprehensive access during development or testing. Additionally, a dedicated port can be specified with management.server.port=8081 to separate administrative traffic from the main application port, reducing the in production environments. These options allow fine-grained control over endpoint availability and accessibility. Actuator integrates seamlessly with to enforce and on its endpoints when the security module is present on the . In development profiles, endpoints like /actuator/health are typically accessible without by default, facilitating quick local diagnostics, though production deployments require explicit securing to prevent unauthorized access. This integration ensures that sensitive introspection capabilities remain protected while supporting metrics collection for broader .

Metrics and Health Checks

Spring Boot Actuator provides robust support for health monitoring through the /health , which aggregates the status of various application components into an overall . This returns a response indicating the application's as UP, DOWN, OUT_OF_SERVICE, or UNKNOWN, based on the contributions from multiple HealthIndicator beans. Built-in indicators include checks for disk space availability via DiskSpaceHealthIndicator, database connectivity through DataSourceHealthIndicator, and availability of external services like or when relevant dependencies are present. Customization of health checks is achieved by implementing the HealthIndicator interface, allowing developers to define application-specific probes that return a object with status and details. For instance, a custom indicator might verify the health of a third-party by attempting a lightweight connection and including diagnostic details in the response if issues arise. The aggregation logic combines individual indicator statuses, with the overall health reflecting the worst status among them, ensuring that any failure propagates to the top level. Health checks are designed to be fast, typically completing before HTTP timeouts, and can be secured or exposed selectively via management properties. Metrics collection in Spring Boot Actuator is powered by integration with Micrometer, a vendor-neutral metrics facade that enables the exposure of application performance data without tying to a specific system. Upon including the spring-boot-starter-actuator dependency, auto-configures Micrometer to collect built-in metrics such as JVM usage (e.g., jvm.memory.used), collection statistics (jvm.gc.pause), counts (jvm.threads.live), and HTTP request metrics (http.server.requests) tagged by method, , status, and outcome. These metrics provide insights into resource utilization and request patterns, helping diagnose bottlenecks like high or leaks. Developers can extend metrics support by registering custom gauges for static values, such as cache sizes, or counters for incremental like error occurrences, using the injected MeterRegistry or by providing MeterBinder beans. For example, a might track the size of an in-memory with registry.gauge("myapp.dictionary.size", tags, dictionary, Map::size). Metrics are exposed via the /actuator/metrics endpoint in a hierarchical name format and can be exported to external systems; adding micrometer-registry-prometheus enables scraping at /actuator/prometheus for integration, while micrometer-registry-graphite allows pushing to a server configured via properties like management.graphite.metrics.export.host. This setup supports dimensional metrics with tags for filtering and aggregation in tools like . Auditing in Spring Boot Actuator facilitates tracking of security-related and custom application events through a flexible event-publishing . By default, when is on the classpath, publishes audit events for success, failure, and access denied exceptions, which can be listened to using @EventListener methods on beans that handle AuditApplicationEvent. Developers can customize this by implementing AuditEventRepository to store events persistently, such as in a database, or use the in-memory variant for testing, though the latter retains only recent events and is not production-suitable. For business-specific auditing, events can be published manually via an injected ApplicationEventPublisher. Request sampling is supported through the /auditevents endpoint, which queries the AuditEventRepository for recent events, providing details like principal, event type, and timestamp. Separately, the /httptrace endpoint offers request-level tracing by storing HTTP request-response exchanges in an HttpTraceRepository bean, defaulting to the last 100 entries for quick diagnostics of incoming traffic patterns without full distributed tracing overhead. Configuration limits storage to prevent memory issues, and events can be filtered by type or time range in the endpoint response. Tracing capabilities in Spring Boot Actuator leverage Micrometer Tracing to support distributed systems monitoring, with built-in compatibility for Zipkin as a trace backend. Actuator auto-configures tracing when micrometer-tracing-bridge-brave (for OpenZipkin ) or micrometer-tracing-bridge-otel (for OpenTelemetry) is included, along with exporters like zipkin-reporter-brave or opentelemetry-exporter-zipkin. Traces are sampled at a default probability of 10%, configurable to 100% for full visibility via management.tracing.sampling.probability=1.0, and propagated across services using and IDs in HTTP headers. The /actuator/traces endpoint allows querying stored traces by ID, while integration with Spring Web components like RestTemplate, WebClient, or Feign automatically instruments HTTP calls for span creation. For legacy compatibility, Spring Cloud Sleuth's functionality is bridged through Micrometer Tracing in earlier versions, but in Spring Boot 3.x and later, direct use of Micrometer or OpenTelemetry is recommended for Zipkin-compatible distributed tracing, enabling visualization of request flows across in tools like Zipkin UI.

Ecosystem Integrations

Spring Security

Spring Boot provides seamless integration with , enabling developers to add and authorization capabilities to web applications with minimal . By including the spring-boot-starter-security , Spring Boot automatically secures the application by registering a SecurityFilterChain that protects all HTTP endpoints, including the default /error page. This auto- applies only to servlet-based web applications and is disabled for non-web environments unless explicitly enabled. By default, it enables HTTP Basic or form login based on the request's content type, and generates a default user with the username "user" and a randomly generated password logged at the WARN level during startup. Developers can customize the default credentials using properties such as spring.security.user.name and spring.security.user.password in the application.properties file. For custom security configurations, Spring Boot leverages Spring Security's annotation-based approach with @EnableWebSecurity on a configuration class, which enables the creation of a custom SecurityFilterChain bean to override default access rules. This allows fine-grained control over authorization, such as requiring authentication for specific paths while permitting anonymous access to others. A typical configuration might look like this:
java
@Configuration
@EnableWebSecurity
public class SecurityConfig {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http.authorizeHttpRequests((requests) -> requests
            .requestMatchers("/public/**").permitAll()
            .anyRequest().authenticated()
        );
        http.formLogin(withDefaults());
        return http.build();
    }
}
This setup ensures that unprotected endpoints are secured without manual filter registration. Spring Boot's integration extends to advanced features like OAuth 2.0 support for client, resource server, and authorization server roles, as well as JWT token validation, all enabled out-of-the-box through dedicated starters such as spring-boot-starter-oauth2-client and spring-boot-starter-oauth2-resource-server. CSRF protection is automatically activated using the Synchronizer Token Pattern, storing tokens in the HTTP session via HttpSessionCsrfTokenRepository, while session management handles concurrency, fixation protection, and timeouts by default. Configuration for OAuth 2.0 can be done via properties, for example:
properties
spring.security.oauth2.client.registration.google.client-id=my-client-id
spring.security.oauth2.client.registration.google.client-secret=my-secret
These features reduce and align with modern security standards. Integration with Spring Boot allows securing management endpoints, such as /actuator/[health](/page/Health) and /actuator/metrics, using the same SecurityFilterChain. By default, if no custom chain is defined, all endpoints except /health require . Custom rules can use EndpointRequest to target actuator paths specifically, applying HTTP authentication or role-based access, like restricting to users with the ENDPOINT_ADMIN role. An example configuration is:
java
@Bean
public SecurityFilterChain actuatorSecurityFilterChain(HttpSecurity http) throws Exception {
    http.securityMatcher(EndpointRequest.toAnyEndpoint())
        .authorizeHttpRequests((requests) -> requests.anyRequest().hasRole("ENDPOINT_ADMIN"))
        .httpBasic(Customizer.withDefaults());
    return http.build();
}
This ensures production-ready applications maintain secure monitoring without exposing sensitive data.

Spring Data Modules

Spring Boot integrates seamlessly with the Spring Data project to simplify the development of persistence layers in applications, providing auto-configuration for various data access technologies and enabling the creation of interfaces without . This integration supports both relational and databases, allowing developers to focus on domain logic rather than setup. The spring-boot-starter-data-jpa starter facilitates JPA-based data access using Hibernate as the default provider, along with support for JDBC operations. Upon inclusion in the project dependencies, it auto-configures a bean—typically using HikariCP as the —and a JpaTransactionManager for handling transactions, provided a database is specified in the application properties. For example, developers can define entity classes annotated with and repositories extending CrudRepository or JpaRepository to gain automatic CRUD methods and derived query capabilities. To enable repository support, the @EnableJpaRepositories annotation is used on a configuration class, which triggers component scanning for repository interfaces in the specified base packages—defaulting to the package of the main application class. This setup allows method names like findByLastname to generate queries dynamically based on entity properties, reducing the need for manual JPQL or native SQL. For NoSQL databases, dedicated starters such as spring-boot-starter-data-mongodb provide integration with MongoDB, auto-configuring a MongoClient and MongoTemplate for document-based operations. Similarly, spring-boot-starter-data-redis enables Redis usage with connection factories and template classes for key-value store interactions. These starters handle connection pooling and serialization, such as using Jackson for JSON mapping in MongoDB. Spring Boot also supports embedded databases like for testing purposes, which can be activated by including the spring-boot-starter-data-jpa and com.h2database:h2 dependencies, allowing in-memory databases without external setup. Auditing features are enabled via the @EnableJpaAuditing annotation on a class, which automatically populates timestamp fields like @CreatedDate and @LastModifiedDate on entities implementing Auditable. This requires an AuditorAware bean to provide the current user context for fields like @CreatedBy.

Spring Cloud

Spring Cloud extends Spring Boot's capabilities to build cloud-native architectures by providing tools for distributed systems patterns such as , , and API routing. It integrates seamlessly with Spring Boot through dedicated starters and auto-configuration, enabling developers to incorporate these features with minimal . This integration allows Spring Boot applications to operate effectively in dynamic, scalable environments like or cloud platforms, where services need to discover each other, share configurations, and handle failures gracefully. Central to this integration are Spring Boot starters for key Spring Cloud components. For service discovery, the spring-cloud-starter-netflix-eureka-client starter enables applications to register with and query a Eureka server, facilitating dynamic service location without hard-coded endpoints. Note that while Eureka remains supported, components like Ribbon are in maintenance mode, with Spring Cloud LoadBalancer recommended as the modern alternative for load balancing. Similarly, the spring-cloud-starter-config starter supports the Config Server for centralized, externalized configuration, allowing properties to be fetched from repositories like Git at runtime and supporting environment-specific profiles. The spring-cloud-starter-gateway starter powers Spring Cloud Gateway, an API gateway that routes requests to downstream services using reactive, non-blocking I/O based on Spring WebFlux. Auto-configuration for cloud profiles is activated via annotations like @EnableDiscoveryClient, which bootstraps discovery clients for various registries, including Eureka, and integrates with Spring Boot's property sources for seamless profile activation in cloud deployments. Key components for inter-service communication include @EnableDiscoveryClient for enabling service registration and discovery, often paired with client-side load balancing tools. Spring Cloud LoadBalancer provides intelligent load balancing by distributing requests across discovered instances, while Feign (via Spring Cloud OpenFeign) simplifies declarative HTTP client creation by abstracting calls into interfaces, automatically incorporating LoadBalancer for balancing. These elements allow Spring Boot applications to consume services dynamically, reducing coupling and improving scalability in setups. For resilience in distributed environments, Spring Cloud incorporates circuit breakers through , which prevents cascading failures by monitoring call success rates and fallback mechanisms when thresholds are exceeded. Distributed tracing is handled by , which automatically adds trace and span IDs to logs and propagates them across service boundaries via HTTP headers, aiding in debugging and performance analysis when integrated with tools like Zipkin. With Spring Boot 3.x, native image support via has been officially integrated into Spring Cloud, enabling faster startup times and lower memory footprints for cloud-native deployments such as serverless functions or containerized . This update aligns Spring Cloud with modern cloud practices, supporting the 2025.0.0 release train (Northfields) compatible with Boot 3.3 and later versions, with ongoing support for upcoming Boot 4.0.

Deployment Options

JAR and WAR Packaging

Spring Boot applications are typically packaged as executable files, which bundle the application code, dependencies, and an embedded server into a single archive runnable via the java -jar command. The Spring Boot Maven plugin achieves this through its repackage goal, executed during the package phase of the build lifecycle, which assembles all dependencies into a "fat" with a specific : application classes in BOOT-INF/classes and libraries in BOOT-INF/lib. Similarly, the Spring Boot Gradle plugin uses the bootJar task to produce an equivalent executable , maintaining the same internal structure for self-contained execution. This format relies on Spring Boot's custom classloader to handle nested JARs, enabling direct launches without requiring a separate . For web applications intended for traditional servlet containers, Spring Boot supports packaging, where the plugin configures the archive to include an embedded server as a fallback, allowing it to run executably with java -jar while remaining deployable to external containers like or . In builds, classes reside in WEB-INF/classes, with provided dependencies (such as servlet APIs) excluded from the WEB-INF/lib-provided directory to prevent conflicts in container environments, and the overall structure adheres to servlet specifications for compatibility. The repackage goal and bootWar task handle this configuration automatically when the project's type is set to war. Since version 2.3, Spring Boot introduces layered JARs (and WARs) to optimize , particularly for , by dividing the fat archive into distinct layers based on content stability, as defined in a BOOT-INF/layers.idx file. Default layers include dependencies for stable libraries, spring-boot-loader for the loader classes, snapshot-dependencies for frequently updated snapshots, and application for classes and resources that change often; this separation allows to cache unchanged layers, reducing image build times and sizes during iterative development. The and plugins enable layering via simple configuration, such as setting <layers><enabled>true</layers> in or layered { enabled = true } in , facilitating efficient multi-stage builds without custom extraction scripts. For production deployments requiring code integrity, and provide support for digitally signing executable JARs and WARs using plugins like maven-jarsigner-plugin and the , which apply signatures to the outer archive and can be extended to nested dependencies via custom tasks, ensuring tamper detection in secure environments. These tools integrate with the Spring Boot repackaging , allowing post-build signing with keystores generated by keytool and executed via jarsigner, though care is needed to preserve the executable format's nested .

External Application Servers

Spring Boot applications can be deployed to external application servers such as , , or by packaging them as Web Application Archive () files, allowing integration with traditional servlet container environments. This approach contrasts with the default embedded server setup, enabling the use of existing infrastructure where the external server handles the application lifecycle, including startup, shutdown, and resource management. To prepare a Spring Boot application for external deployment, it must be built as file, which requires extending the SpringBootServletInitializer class in the main application class to configure the servlet context. Additionally, the embedded must be disabled by setting the scope of the spring-boot-starter-tomcat dependency to provided in the pom.xml file (or equivalent in ), ensuring the external server provides the necessary runtime components. For example, in Maven:
xml
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>
Once built, the file is deployed by copying it to the server's webapps directory (e.g., Tomcat's webapps folder), where the server automatically deploys and initializes the application upon startup. The Spring Boot initializer hooks into the servlet container's lifecycle via the SpringBootServletInitializer, enabling auto-configuration and context setup without requiring manual intervention. Deployment to external servers presents challenges, particularly around version compatibility; for instance, Spring Boot 3.x requires Servlet 5.0 or higher ( 9+) and uses the , necessitating servers like 10+, 11+, or equivalent. integration is another consideration, as Spring Boot's default Logback implementation must be bridged to the external server's logging system (e.g., via JULI in ) to consolidate output, often configured through logback.xml or server-specific adapters. In the 2020s, there has been a notable trend from external application servers to ones for cloud-native architectures, driven by the simplicity of self-contained JAR deployments in platforms like and serverless environments, reducing operational overhead and improving portability. This shift aligns with broader adoption of , where servers facilitate faster deployments and scaling without reliance on external .

Testing Support

Integration Testing with @SpringBootTest

The @SpringBootTest annotation enables integration testing by loading the complete application context, allowing developers to verify the interactions between multiple components in a Spring Boot application as they would run in production. This approach contrasts with unit tests by including auto-configuration, beans, and dependencies, facilitating end-to-end scenarios such as database interactions and service calls. A key feature of @SpringBootTest is its support for web environments through the webEnvironment attribute, which defaults to WebEnvironment.MOCK for simulating HTTP requests without starting an actual server. For more realistic testing, setting webEnvironment = WebEnvironment.RANDOM_PORT launches an embedded server on a randomly assigned port, preventing port conflicts and enabling tests against a fully operational web layer. This is particularly useful for validating full request-response cycles in integration scenarios. In web-focused integration tests, tools for assertions include MockMvc, which can be configured by adding the @AutoConfigureMockMvc annotation to allow in-memory HTTP request simulation for efficient verification of controllers and endpoints without network overhead. TestRestTemplate is automatically configured and can be autowired when an embedded server is running (e.g., with webEnvironment = WebEnvironment.RANDOM_PORT), facilitating actual HTTP calls to the running server, ideal for testing load balancers or external integrations. For example, a test class annotated with @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) can inject TestRestTemplate to perform GET requests and assert responses, ensuring the entire stack functions correctly. To reference the dynamically assigned random port in tests, use @LocalServerPort or @Value("${local.server.port}") to inject the value. The implicitly activates the test , enabling the use of test-specific property sources and configurations without manual setup; this aligns with Spring's for environment-specific behavior, as detailed in broader . Placeholders like ${random.int(8080,8090)} can be used in to manually set a random port value within a range for dynamic when not relying on the framework's . While @SpringBootTest emphasizes comprehensive loading, Spring Boot offers sliced alternatives for targeted : @WebMvcTest loads only the web and MVC layers to isolate controller s, and @DataJpaTest focuses on the persistence layer for verification, reducing startup time compared to full- tests.

Sliced Testing Approaches

Sliced testing approaches in Spring Boot enable developers to create focused, lightweight tests that target specific layers or components of an application, such as the web layer, , or handling, without loading the entire application context. These tests use specialized annotations that automatically configure only the necessary beans and infrastructure, reducing overhead and improving isolation. This modular strategy contrasts with broader integration tests by emphasizing speed and specificity, making it suitable for verifying individual functionalities in isolation. Key examples of sliced test annotations include @JsonTest, which is designed for testing JSON serialization and deserialization. This annotation auto-configures Jackson-based components, such as ObjectMapper and related modules, while excluding unrelated auto-configurations like web or database setups. For instance, a @JsonTest can verify that a domain object serializes to the expected format by injecting the ObjectMapper and performing assertions on the output. Similarly, @WebFluxTest targets reactive , auto-configuring the Spring WebFlux testing framework, including WebTestClient for endpoint simulations, but limiting the context to controllers and their direct dependencies. To handle dependencies in sliced tests, Spring Boot provides @MockBean, an annotation that injects a mock into the application context, overriding any existing bean of the same type. This allows precise control over external collaborations, such as mocking a service in a slice to isolate controller . For data-focused slices like @DataJpaTest, Spring Boot defaults to an in-memory database such as , auto-configuring JPA repositories and transaction management while excluding -related beans, enabling rapid validation of persistence operations without external database connections. These approaches offer significant performance benefits, as they bootstrap a minimal context with fewer beans—often resulting in startup times that are substantially faster than those of full @SpringBootTest configurations. This efficiency is particularly valuable in continuous integration and continuous deployment (CI/CD) pipelines, where quicker test execution reduces overall build times and enables faster feedback loops. Since Spring Boot 2.2, sliced tests can integrate with Testcontainers for more realistic testing of external services, such as databases or message brokers, by using annotations like @Testcontainers and @Container to manage Docker containers programmatically. This extension allows replacing mocks with actual service instances in a controlled environment, enhancing test reliability without compromising the lightweight nature of slices, and has been further streamlined in Spring Boot 3.1 with dedicated auto-configuration for container lifecycle management.

References

  1. [1]
    Spring Boot
    Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can just run.Building an Application with · Spring Boot 3.5.7 API · Documentation
  2. [2]
    Spring Boot
    Spring Boot helps you to create stand-alone, production-grade Spring-based applications that you can run.Tutorials · Core Features · How-to Guides · Installing Spring Boot
  3. [3]
    Spring Boot 1.0 GA Released
    Apr 1, 2014 · I am very pleased to announce the general availability of Spring Boot 1.0! You can download the 1.0.1 with an important security fix here.
  4. [4]
    Production-ready Features :: Spring Boot
    Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.Enabling Production-ready... · Endpoints · Metrics · Monitoring and Management...
  5. [5]
    Spring Framework Overview
    Today, with the help of Spring Boot, applications are created in a devops- and cloud-friendly way, with the Servlet container embedded and trivial to change.
  6. [6]
    Why Spring
    Spring Boot combines necessities such as an application context and an auto-configured, embedded web server to make microservice development a cinch.Missing: official | Show results with:official
  7. [7]
    Pivotal + VMware—Transforming How More of the World Builds ...
    Aug 22, 2019 · Today we are announcing that we have reached an agreement to be acquired by VMware. We'll expand the opportunities for both companies by ...<|control11|><|separator|>
  8. [8]
    Introduction to Spring Boot - GeeksforGeeks
    Aug 28, 2025 · Major Spring Boot Versions · Spring Boot 1.0 (April 2014) · Spring Boot 2.0 (March 2018) · Spring Boot 3.0 (November 2022) (Introduced Jakarta EE 9 ...<|control11|><|separator|>
  9. [9]
    Spring and Spring Boot Frameworks: A Brief History - DZone
    Sep 17, 2019 · ... Spring Boot, have come to dominate the way Java developers write code. The developer Rod Johnson came up with the idea of Spring in 2002.
  10. [10]
    Spring Boot version history - CodeJava.net
    Oct 31, 2025 · ... Spring Boot, which gives you understand how it has been evolving over time. 1. Spring Boot 1.x. Initial Release: April 2014. Key Features ...
  11. [11]
    Spring Boot 3.0 Release Notes - GitHub
    Nov 13, 2024 · Spring Boot 3.0 requires Java 17 as a minimum version. ... Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies.
  12. [12]
    Preparing for Spring Boot 3.0
    May 24, 2022 · Spring Boot 2.0 was the first release in the 2.x line and was published on Feburary 28th 2018. We've just released Spring Boot 2.7 which ...<|control11|><|separator|>
  13. [13]
  14. [14]
  15. [15]
    Spring Boot 3.2.0 available now
    Nov 23, 2023 · The highlights of the 3.2 release include: Support for Virtual Threads; Initial support for JVM Checkpoint Restore (Project CRaC); SSL Bundle ...
  16. [16]
    Auto-configuration :: Spring Boot
    Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added.
  17. [17]
    EnableAutoConfiguration (Spring Boot 3.5.7 API)
    Enable auto-configuration of the Spring Application Context, attempting to guess and configure beans that you are likely to need.
  18. [18]
    Build Systems :: Spring Boot
    ### Summary of Spring Boot Starters
  19. [19]
    Embedded Web Servers :: Spring Boot
    Each Spring Boot web application includes an embedded web server. This feature leads to a number of how-to questions, including how to change the embedded ...Use Another Web Server · Configure Server Name... · Configure the Web Server
  20. [20]
  21. [21]
  22. [22]
  23. [23]
  24. [24]
    Using the @SpringBootApplication Annotation :: Spring Boot
    Many Spring Boot developers like their apps to use auto-configuration, component scan and be able to define extra configuration on their application class.
  25. [25]
    Spring Boot 1.2 Release Notes - GitHub
    Nov 13, 2024 · Spring Boot now uses Tomcat 8 and Jetty 9 as embedded servlet containers. This provides Servlet 3.1 and enhanced WebSocket support out of the box.
  26. [26]
    SpringApplication :: Spring Boot
    The SpringApplication class provides a convenient way to bootstrap a Spring application that is started from a main() method.
  27. [27]
    SpringBootServletInitializer (Spring Boot 3.5.7 API)
    SpringBootServletInitializer is an opinionated WebApplicationInitializer to run a SpringApplication from a traditional WAR deployment, needed only if building ...
  28. [28]
    Traditional Deployment :: Spring Boot
    Traditional Spring Boot deployment involves creating a WAR file by using SpringBootServletInitializer, changing build to war, and marking the embedded servlet ...
  29. [29]
    92. Traditional Deployment - Spring
    The first step in producing a deployable war file is to provide a SpringBootServletInitializer subclass and override its configure method.
  30. [30]
    A Quick Intro to the SpringBootServletInitializer | Baeldung
    Mar 17, 2024 · This is an extension of WebApplicationInitializer which runs a SpringApplication from a traditional WAR archive deployed on a web container.
  31. [31]
    10 Reasons Why You Should Use Spring Boot - Sigma Solve Inc
    Jul 12, 2023 · Spring Boot applications may be easily converted from JAR to WAR and deployed on conventional servers if embedded ones are not desired.What Is Spring Boot? · 3. Web Servers That Are... · 8. Spring Profiles<|control11|><|separator|>
  32. [32]
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
  39. [39]
    Enabling Production-ready Features :: Spring Boot
    The spring-boot-actuator module provides all of Spring Boot's production-ready features. The recommended way to enable the features is to add a dependency.
  40. [40]
    Endpoints :: Spring Boot
    Actuator endpoints let you monitor and interact with your application. Spring Boot includes a number of built-in endpoints and lets you add your own.
  41. [41]
    Spring Security :: Spring Boot
    If Spring Security is on the classpath, then web applications are secured by default. This includes securing Spring Boot's /error endpoint.
  42. [42]
    HealthIndicator (Spring Boot 3.5.7 API)
    HealthIndicator extends HealthContributor. Strategy interface used to contribute Health to the results returned from the HealthEndpoint.Missing: documentation | Show results with:documentation
  43. [43]
    Metrics :: Spring Boot
    Spring Boot Actuator provides dependency management and auto-configuration for Micrometer, an application metrics facade that supports numerous monitoring ...
  44. [44]
    Auditing :: Spring Boot
    Spring Boot Actuator has a flexible audit framework that publishes events (by default, “authentication success”, “failure” and “access denied” exceptions).Missing: @eventlistener
  45. [45]
    Tracing :: Spring Boot
    To collect and visualize the traces, we need a running trace backend. We use Zipkin as our trace backend here.
  46. [46]
  47. [47]
    Java Configuration :: Spring Security
    The first step is to create our Spring Security Java Configuration. The configuration creates a Servlet Filter known as the springSecurityFilterChain ...
  48. [48]
    Cross Site Request Forgery (CSRF) :: Spring Security
    By default, Spring Security stores the expected CSRF token in the HttpSession by using HttpSessionCsrfTokenRepository , so no additional code is necessary. The ...
  49. [49]
    OAuth 2.0 Resource Server JWT :: Spring Security
    Resource Server will automatically configure itself to validate JWT-encoded Bearer Tokens. It achieves this through a deterministic startup process.
  50. [50]
    Data Access :: Spring Boot
    Spring Boot includes a number of starters for working with data sources. This section answers questions related to doing so.Configure a Custom DataSource · Use Spring Data Repositories · Using Multiple...
  51. [51]
    Spring Data
    Spring Data is an umbrella project consisting of independent projects with, in principle, different release cadences. To manage the portfolio, a BOM (Bill of ...JPA · Spring Data REST · Spring Data JDBC · Spring Data Repositories
  52. [52]
    Spring Data MongoDB
    Spring Data for MongoDB is part of the umbrella Spring Data providing integration with the MongoDB document database with a wide range of server and driver ...
  53. [53]
    Auditing :: Spring Data JPA
    The following example shows how to use the @EnableJpaAuditing annotation: Example 3. Activating auditing with Java configuration. @Configuration @ ...
  54. [54]
    Spring Cloud
    Spring Cloud Stream Applications are out of the box Spring Boot applications providing integration with external middleware systems such as Apache Kafka, ...Html · Stream · Netflix and Eureka · Spring Cloud Release
  55. [55]
    GraalVM Native Images :: Spring Boot
    GraalVM Native Images are standalone executables that can be generated by processing compiled Java applications ahead-of-time.
  56. [56]
    Eureka Server - Spring Cloud Netflix
    This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring ...Eureka Metadata for Instances... · Zones · Using Eureka with Spring...
  57. [57]
    Spring Cloud Config
    Spring Cloud Config provides server-side and client-side support for externalized configuration in a distributed system.
  58. [58]
    Spring Cloud Gateway
    This project provides an API Gateway built on top of the Spring Ecosystem, including: Spring 6, Spring Boot 3 and Project Reactor. Spring Cloud Gateway aims ...How to Include Spring Cloud... · Spring Cloud Gateway Server... · Spring Projects
  59. [59]
    Getting Started | Service Registration and Discovery - Spring
    This guide involves setting up a Netflix Eureka service registry, building two web clients, and using Spring Initializr to pull in dependencies.
  60. [60]
    6. Client Side Load Balancer: Ribbon - Spring Cloud Project
    Ribbon is a client-side load balancer that gives you a lot of control over the behavior of HTTP and TCP clients. Feign already uses Ribbon, so, ...
  61. [61]
    Spring Cloud Circuit Breaker
    Spring Cloud Circuit breaker provides an abstraction across different circuit breaker implementations. It provides a consistent API to use in your applications.Missing: tracing | Show results with:tracing
  62. [62]
    From Spring Native to Spring Boot 3
    Feb 23, 2023 · We are finishing to transition the Spring support for building native executables from the experimental Spring Native project to the official Spring Boot ...
  63. [63]
    Packaging Executable Archives :: Spring Boot - Maven Plugin
    The plugin can create executable archives (jar files and war files) that contain all of an application's dependencies and can then be run with java -jar.<|separator|>
  64. [64]
    Packaging Executable Archives :: Spring Boot
    The plugin can create executable archives (jar files and war files) that contain all of an application's dependencies and can then be run with java -jar.
  65. [65]
    Efficient Container Images :: Spring Boot
    Spring Boot uses a layer index file to layer jar files, separating code based on change likelihood, to avoid overhead and optimize Docker images.
  66. [66]
  67. [67]
    The Signing Plugin - Gradle User Manual
    The Signing Plugin adds the ability to digitally sign built files and artifacts. These digital signatures can then be used to prove who built the artifact.Missing: Spring Boot
  68. [68]
    Deploying Spring Boot Applications
    ### Summary of "Traditional Deployment" Section from Spring Boot 3.2.9 Reference
  69. [69]
    SpringBootTest (Spring Boot 3.5.7 API)
    Provides the following features over and above the regular Spring TestContext Framework:
  70. [70]
  71. [71]
  72. [72]
  73. [73]
    MockBean (Spring Boot 3.5.7 API)
    Annotation that can be used to add mocks to a Spring ApplicationContext. Can be used as a class level annotation or on fields in either @Configuration classes, ...
  74. [74]
  75. [75]
    Optimizing Spring Integration Tests | Baeldung
    Jul 18, 2018 · Optimize Spring integration tests by using profiles wisely, reconsidering @MockBean, using test slices, and refactoring into unit tests.
  76. [76]
    Testcontainers :: Spring Boot
    The Testcontainers library provides a way to manage services running inside Docker containers. It integrates with JUnit, allowing you to write a test class.Using Spring Beans · Importing Container... · Service Connections