
RFC 9457 Problem Details for Error Responses in Spring
Return RFC 9457 problem details from a Spring Boot API: ProblemDetail, ErrorResponse, a ControllerAdvice, extension members and enabling it globally.
Tag
51 posts

Return RFC 9457 problem details from a Spring Boot API: ProblemDetail, ErrorResponse, a ControllerAdvice, extension members and enabling it globally.

Learn the order in which Spring Boot reads configuration: command line, environment, profile files, application files and defaults.

Fix the Maven and Gradle error about a missing main class by repackaging only the runnable module or by naming the main class explicitly.

Enforce package and module boundaries in Java with ArchUnit rules and Spring Modulith's verify, so architecture decisions fail the build instead of drifting.

Implement the saga pattern in Java: choreography versus orchestration, compensating actions, persisted state and failure handling.

Implement event sourcing and CQRS in Java: an event store, aggregates rebuilt from events, projections for reads, snapshots and when the cost is justified.

Find why a Java pod restarts in a loop by reading previous logs, exit codes and probe events, then fix OOM kills, bad config and probes that fire too early.

Find why a Java application starts slowly: measure each phase, log class loading and bean creation, catch DNS and network stalls, then fix the biggest item.

Why Hibernate throws StaleObjectStateException when two users edit one row, and how to handle it with versioning, retries or pessimistic locks.

Build a small REST API with Spring Boot 4 and JDK 25: generate the project, write a controller, add an in memory service, validate input and run the tests.

Structure a Spring Boot application with ports and adapters so the domain has no framework imports, with an order example, package layout and tests.

Create a Spring Boot project with Maven using Spring Initializr, curl or an IDE, and read the parent POM, starters and wrapper it generates.