From e76f4ef22d9df3dbe71607e14d7586e04a8fed1a Mon Sep 17 00:00:00 2001 From: wantaek Date: Wed, 9 Sep 2026 14:53:53 +0900 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=EC=A6=89=EC=8B=9C=20?= =?UTF-8?q?=EB=8D=AE=EC=96=B4=EC=8D=A8=EC=A7=80=EB=8A=94=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=20=EC=83=81=ED=83=9C=EC=BD=94=EB=93=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SimpleMappingExceptionResolver 의 statusCodes 는 뷰 이름을 키로 쓰는 Properties 라, 같은 키에 두 번 넣으면 뒤엣값만 남는다. 바로 다음 줄이 같은 'sample/egovSampleError' 에 500 을 넣으므로 400 설정은 등록 시점에 사라져 어떤 예외도 400 으로 응답하지 않는다. exceptionMappings 다섯 줄과 setDefaultErrorView 가 모두 같은 뷰를 쓰는 구조라 이 설정이 표현할 수 있는 상태코드는 하나뿐이다. 효과가 없는 줄을 지운다. 응답 상태코드는 바뀌지 않는다. --- src/main/java/egovframework/example/config/EgovConfigWeb.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/egovframework/example/config/EgovConfigWeb.java b/src/main/java/egovframework/example/config/EgovConfigWeb.java index bd5f2e5..1c10da8 100644 --- a/src/main/java/egovframework/example/config/EgovConfigWeb.java +++ b/src/main/java/egovframework/example/config/EgovConfigWeb.java @@ -115,7 +115,6 @@ public void configureHandlerExceptionResolvers(List re prop.setProperty("java.lang.Throwable", "sample/egovSampleError"); Properties statusCode = new Properties(); - statusCode.setProperty("sample/egovSampleError", "400"); statusCode.setProperty("sample/egovSampleError", "500"); SimpleMappingExceptionResolver smer = new SimpleMappingExceptionResolver();