Skip to content

Commit

Permalink
hotfix: RestControllerAdvice 순서 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
kmebin committed Dec 5, 2023
1 parent 6510439 commit 2232a93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.Map;
import java.util.Optional;

import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
Expand All @@ -26,6 +27,7 @@
import com.moabam.global.error.exception.UnauthorizedException;
import com.moabam.global.error.model.ErrorResponse;

@Order(1)
@RestControllerAdvice
public class GlobalExceptionHandler {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.moabam.global.error.handler;

import org.springframework.context.annotation.Profile;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
Expand All @@ -12,6 +13,7 @@
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;

@Order(2)
@RestControllerAdvice
@Profile({"dev", "prod"})
@RequiredArgsConstructor
Expand Down

0 comments on commit 2232a93

Please sign in to comment.