Skip to content

Commit

Permalink
Merge pull request #272 from Denia-park/fix/ControllerAdvice-동작-이슈
Browse files Browse the repository at this point in the history
ControllerAdvice-동작-이슈
  • Loading branch information
Denia-park authored Mar 17, 2024
2 parents 60acb16 + 484593c commit 6850edf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.extern.slf4j.Slf4j;
import org.hyunggi.mygardenbe.common.exception.BusinessException;
import org.hyunggi.mygardenbe.common.response.ApiResponse;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.validation.BindException;
import org.springframework.web.bind.annotation.ExceptionHandler;
Expand All @@ -16,6 +18,7 @@
* - API Controller에서 발생하는 예외를 처리하는 Advice
*/
@RestControllerAdvice
@Order(Ordered.HIGHEST_PRECEDENCE)
@Slf4j
public class ApiControllerAdvice {
public ApiControllerAdvice() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import net.gpedro.integrations.slack.SlackField;
import net.gpedro.integrations.slack.SlackMessage;
import org.springframework.context.annotation.Profile;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

Expand All @@ -24,10 +22,9 @@
* - 서버 에러 발생 시 Slack으로 알림을 보내는 Controller Advice
* - Profile이 prod일 때만 동작
*/
@Profile("prod2")
@Profile("prod")
@RequiredArgsConstructor
@RestControllerAdvice
@Order(Ordered.LOWEST_PRECEDENCE)
@Slf4j
public class ServerErrorDetectControllerAdvice {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Slack 관련 Bean 생성 Configuration
*/
@Profile("prod2")
@Profile("prod")
@Configuration
public class SlackLogAppenderConfiguration {
/**
Expand Down

0 comments on commit 6850edf

Please sign in to comment.