Class GlobalExceptionHandler

java.lang.Object
io.github.pasinduog.exception.GlobalExceptionHandler

@ConditionalOnProperty(prefix="api-response", name="enabled", havingValue="true", matchIfMissing=true) @RestControllerAdvice public class GlobalExceptionHandler extends Object
Global exception handler for Spring Boot REST APIs.

This class provides centralized exception handling using Spring's RestControllerAdvice mechanism. It converts various exceptions into RFC 7807 ProblemDetail responses with trace IDs for debugging.

Can be disabled by setting api-response.enabled=false in application properties.

Since:
1.0.0
Version:
2.0.0
Author:
Pasindu OG