
Fix Spring Boot Test Failed to Load ApplicationContext
Find why a Spring Boot test cannot load its ApplicationContext, from a missing configuration class to a missing bean, property or database.
Everything you need to level up your coding skills.

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.

Spring Security lambda DSL explained: why and() chaining was replaced, how to write authorizeHttpRequests, formLogin and csrf with lambdas.

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.

Fix the 400 Bad Request caused by a request body Spring MVC cannot read, from an empty body to a wrong type, a bad enum or malformed JSON.

Implement cursor (keyset) pagination in a Spring Boot API with an opaque cursor, a stable sort and a limit plus one query, using JdbcClient or Spring Data.

Implement an Idempotency-Key header in Spring Boot so a retried POST returns the first result: key storage, request hashing, concurrency and expiry.

Document a Java REST API with OpenAPI 3: springdoc-openapi in Spring Boot, annotations for summaries and responses, security schemes and exporting the spec.

Detect the Hibernate N plus 1 query problem with a statement count, then remove it with a fetch join, an entity graph or batch fetching.
We send one email when a new post is published. No spam.