
Spring MVC REST API Guide to Building Clean Endpoints
Build a clean Spring MVC REST API: records at the edge, validation, one error format, pagination, caching headers, security, testing and what to avoid.
Controllers, request binding, validation and exception handlers for web apps built on the servlet stack.

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

A complete guide to custom queries in Spring Data JPA: derived queries, JPQL and native SQL, paging, Specifications, fragments, streaming and tests.

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

Choose between REST, GraphQL and gRPC for a Java service by who calls it, how data is shaped and what tooling you need, with a verdict for each case.

Follow one HTTP request through filters, the DispatcherServlet, handler mapping, argument resolution, the controller and the response writer.

Design stable REST URLs: plural nouns, shallow nesting, query strings for filters, identifiers that never change and a plan for the day a name must change.

A short set of REST API design rules for Java teams: resources, verbs, status codes, errors, pagination, versioning and what to leave out until it is needed.

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

Fix the 400 error for a missing request parameter in Spring MVC with optional parameters, defaults, correct parameter names and the right annotation.

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.

Fix the 415 Unsupported Media Type error by sending the right Content-Type header, matching the consumes attribute and checking the message converters.

Fix a 405 Method Not Allowed from a Spring MVC endpoint by matching the HTTP verb, the path and redirects that turn a POST into a GET.
We send one email when a new post is published. No spam.