com.minlia.rocket.problem.ApiExceptionHandler Maven / Gradle / Ivy
package com.minlia.rocket.problem;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.zalando.problem.spring.web.advice.ProblemHandling;
/**
* Controller advice to translate the server side exceptions to client-friendly json structures. The
* error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
*/
@Validated
@RestControllerAdvice
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class ApiExceptionHandler implements ProblemHandling {
}