Skip to content

Commit 04aff1b

Browse files
committed
chore: 불필요한 빈 주입 제거(SlackApi)
1 parent 659695a commit 04aff1b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/main/java/com/prgrms/mukvengers/global/exception/GlobalExceptionHandler.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import javax.servlet.http.HttpServletRequest;
66

7-
import org.springframework.beans.factory.annotation.Value;
87
import org.springframework.http.ResponseEntity;
98
import org.springframework.validation.BindException;
109
import org.springframework.web.HttpRequestMethodNotSupportedException;
@@ -15,8 +14,6 @@
1514
import org.springframework.web.bind.annotation.RestControllerAdvice;
1615
import org.springframework.web.servlet.NoHandlerFoundException;
1716

18-
import net.gpedro.integrations.slack.SlackApi;
19-
2017
import com.prgrms.mukvengers.global.common.dto.ErrorResponse;
2118
import com.prgrms.mukvengers.global.slack.annotation.SlackNotification;
2219
import com.prgrms.mukvengers.global.utils.MessageUtil;
@@ -33,12 +30,6 @@ public class GlobalExceptionHandler {
3330
private static final String EXCEPTION_REQUEST_URI = "[EXCEPTION] REQUEST_URI -----> [{}]";
3431
private static final String EXCEPTION_HTTP_METHOD_TYPE = "[EXCEPTION] HTTP_METHOD_TYPE -----> [{}]";
3532

36-
private final SlackApi slackApi;
37-
38-
public GlobalExceptionHandler(@Value("${spring.slack.webhook}") String webhook) {
39-
this.slackApi = new SlackApi(webhook);
40-
}
41-
4233
@ExceptionHandler(ServiceException.class) // custom 에러
4334
public ResponseEntity<ErrorResponse> handleServiceException(HttpServletRequest request, ServiceException e) {
4435
ErrorCode errorCode = e.getErrorCode();

0 commit comments

Comments
 (0)