What is the significance of the @HealthIndicator annotation?
Spring Boot has no @HealthIndicator annotation, only a HealthIndicator interface. Learn how to write custom checks, expose the endpoint and use readiness probes.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
Spring Boot has no @HealthIndicator annotation, only a HealthIndicator interface. Learn how to write custom checks, expose the endpoint and use readiness probes.
Add Spring Boot Actuator, expose /actuator/metrics, read JVM and HTTP metrics, create custom meters and connect Prometheus safely.
Spring Boot Actuator adds health checks, Micrometer metrics and diagnostic endpoints to your app. See how to enable, configure and secure them for production.
Run a Spring Boot app straight from Maven with spring-boot:run: compile, start the embedded server and pass profiles, ports and debug options.
Start a Spring Boot app with Maven, Gradle or the executable JAR. Includes passing profiles and ports, and running it as a service in production.
The spring-boot-maven-plugin builds executable JARs, runs your app from Maven and creates container images. Learn its goals, configuration and common pitfalls.
Build an executable fat JAR with Maven or Gradle, start it with java -jar, and use layers or buildpacks for container images.
The spring-boot-starter-parent is a Maven parent POM that manages dependency versions and plugin defaults. Learn how it works and when to use the BOM.
Build a Maven multi-module Spring Boot project with a parent POM, shared library modules and a single runnable app module, including the common pitfalls.
dependencyManagement sets versions, scopes and exclusions once in Maven without adding dependencies. Learn parent POMs, BOM import and common pitfalls.
Use the Spring Boot BOM in Maven or Gradle so library versions stay compatible, and learn how to override, inspect and update them safely.
@Slf4j generates a static SLF4J logger named log in your class at compile time, removing LoggerFactory boilerplate. Learn setup, options and pitfalls.
Use SLF4J loggers in code, tune levels and patterns through properties, and add logback-spring.xml for rolling files, audit logs and profile settings.
Logback is the default logging backend in Spring Boot, used through SLF4J. See how to set levels, rotate files, configure XML and emit structured logs.
Set root and package log levels in Spring Boot with logging.level properties, change them per profile, and adjust them at runtime with Actuator.
The application-{profile}.properties file holds settings loaded only when a Spring profile is active, overriding the base file so one build runs in every environment.
@PropertySource adds a properties file to the Spring Environment so its values can be injected with @Value or bound with @ConfigurationProperties.
CommonsRequestLoggingFilter logs incoming Spring MVC requests, including query string, headers and payload. Learn the setup, options and security cautions.
Log HTTP requests and responses in Spring Boot with a OncePerRequestFilter, caching wrappers and interceptors, with masking and request IDs.
Extend ResponseEntityExceptionHandler to handle Spring MVC exceptions in one place. See overrides for validation errors, custom exceptions and ProblemDetail support.