Spring Boot in production: a DevOps checklist for safer releases
A practical checklist for running a Spring Boot application in production with clear configuration, database handling, observability, security, deployment and rollback.
José Miguel Fernández · Software Engineer · 6+ years of experienceIn this article Current section: Explicit configuration
Running a Spring Boot application in production cannot rely on “it seems to start”. It needs a short list of explicit things: configuration, database, observability, security, deployment and rollback.
Spring Boot helps a lot, but it does not replace operational judgment. An app can compile, start and still be poorly prepared for production.
This checklist does not cover every case. It is meant to catch common risks before the first incident finds them for you.
Explicit configuration
The first step is separating configuration from code. Profiles, environment variables, secrets, external URLs and flags should be clear.
I would review:
- environment-specific profiles
- documented required variables
- secrets outside the repository
- configured timeouts
- upload or payload limits if relevant
- behavior when required configuration is missing
I do not like production apps starting with defaults meant for development. If a critical variable is missing, I prefer the app to fail at startup instead of two hours later during a real request.
Database and migrations
A Spring Boot app often depends heavily on the database. This is where it pays to be conservative.
Important points:
- versioned migrations with Liquibase, Flyway or an equivalent strategy
- connection pool sized for the environment
- indexes for critical queries
- clear transaction boundaries
- tested backup and restore
- compatible changes during progressive deployments
If you are already reviewing performance, this connects directly with Spring Boot performance tuning.
Observability from day one
I would not wait for the first problem before adding visibility.
At minimum, I would want:
- useful health checks
- structured or easy-to-filter logs
- JVM, HTTP and database metrics
- request correlation or tracing as the system grows
- alerts for errors, latency and saturation
Spring Boot Actuator helps a lot, but it needs deliberate exposure. Not every endpoint should be public and not every metric needs an alarm.
The goal is to answer: what is failing, since when, who is affected and whether we can roll back.
Practical security
Security does not start with a huge architecture. It starts with reasonable defaults.
Minimum checklist:
- HTTPS in production
- secrets outside code
- CORS defined, not opened for convenience
- internal endpoints protected
- input validation
- errors without sensitive details
- dependencies kept updated
- minimum permissions for external services
If the app exposes APIs, error design, retries and idempotency matter too. For critical flows, idempotent APIs that survive retries is closely related.
Deployment and rollback
A healthy deployment is not just “upload a version”. It is being able to go back.
Before production, I would review:
- reproducible build
- environment-specific variables
- smoke test after deployment
- documented rollback
- compatible migrations
- accessible logs
- clear owner if something fails
If you use Kubernetes, requests, limits and scaling strategy also matter. I wrote about that in right-sizing Kubernetes pods without guessing.
When to ask for help
Asking for help is not only for the moment when everything is broken. It also makes sense when the backend starts supporting important processes and every change creates doubt.
Signals:
- nobody knows whether a variable is required
- logs do not explain errors
- deployments feel risky
- database changes happen without clear migrations
- there is no real rollback
- response times are increasing
- the team does not know what to inspect during an incident
In those cases, a focused review or evolution of a Spring Boot backend may be more useful than a large migration.
FAQ
Should Spring Boot Actuator always be enabled?
It is usually useful, but not every endpoint should be exposed publicly. Health and metrics need configuration and security.
Do I need Kubernetes for production?
Not always. A small app can run well on a simpler managed platform. Kubernetes makes sense when the team can operate it.
What should I review before tuning performance?
Observability, database behavior and timeouts first. Without metrics, tuning is usually guessing.
When is it worth migrating a legacy backend to Spring Boot?
When the current system slows delivery, increases risk or makes maintenance harder. I cover that in when to migrate a legacy backend to Java Spring Boot.
Sources and verification notes
- Spring Boot Actuator: https://docs.spring.io/spring-boot/reference/actuator/index.html
- Spring Boot externalized configuration: https://docs.spring.io/spring-boot/reference/features/external-config.html
- Spring Boot SQL databases: https://docs.spring.io/spring-boot/reference/data/sql.html
- Spring Boot security reference: https://docs.spring.io/spring-boot/reference/web/spring-security.html
Bottom line
Production does not require making everything complex. It requires knowing where things can fail.
Clear configuration, migrations, observability, security, deployment and rollback. With those pieces cared for, a Spring Boot application stops depending on luck and starts becoming operable.
Applying this to a real system
Do you need to review this problem in production?
I can assess the architecture, risks and next useful change without turning the solution into a larger project than necessary.