From bf352ba11663a44e1ba5e87b5d3ab5fc18604662 Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Tue, 14 Nov 2023 07:33:05 +0000 Subject: [PATCH] feat: fix issue with using exceptionHandler --- .../example/bootbatchjpa/config/GlobalExceptionHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/config/GlobalExceptionHandler.java b/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/config/GlobalExceptionHandler.java index f76e9998f..583c50c1f 100644 --- a/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/config/GlobalExceptionHandler.java +++ b/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/config/GlobalExceptionHandler.java @@ -3,6 +3,8 @@ import java.util.Comparator; import java.util.List; import java.util.Objects; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; import org.springframework.http.ProblemDetail; @@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus; +@Order(Ordered.HIGHEST_PRECEDENCE) @ControllerAdvice public class GlobalExceptionHandler {