
Spring Boot Guide From First Project to Production
Build, configure, test and package a Spring Boot 4 service, then see what separates a demo from a service you can run in production.
Tag
51 posts

Build, configure, test and package a Spring Boot 4 service, then see what separates a demo from a service you can run in production.

Build a clean Spring MVC REST API: records at the edge, validation, one error format, pagination, caching headers, security, testing and what to avoid.

Decide what to unit test, what to run against real infrastructure and what to mock, with a layered plan that keeps a Spring Boot suite fast.

Fix the Whitelabel Error Page in Spring Boot by checking component scanning, the mapped path, the context path and the template location.

Fix the Spring Boot DataSource startup failure by checking the URL, the driver, the active profile and whether the application should have a database at all.

Fix the Spring error about an unresolvable placeholder by checking the property name, the active profile, test resources and environment variable names.

Find why a Spring Boot test cannot load its ApplicationContext, from a missing configuration class to a missing bean, property or database.

Fix a Spring Boot container that exits at once by reading its logs and checking the Java version, jar path, architecture, configuration and memory limit.

Find the process holding port 8080 on macOS, Linux and Windows, stop it, or move Spring Boot to another port, and fix the tests that collide.

Read the failure analysis Spring Boot prints, classify the cause in a minute and use the condition report when no analyzer matches.

Break the circular dependency Spring Boot refuses to start with by extracting a third bean, publishing an event or, as a last resort, using lazy injection.

Handle validation failures in Spring MVC by turning MethodArgumentNotValidException and HandlerMethodValidationException into one clear error response.