From 3c0127728a0360cd2064db55ff5f1252776aef9e Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Thu, 17 Oct 2024 15:15:30 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=B8=EC=A6=9D=EA=B4=80=EB=A0=A8=20i?= =?UTF-8?q?nterceptor=20=EB=AF=B8=EC=82=AC=EC=9A=A9=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/core/spring/config/WebMvcConfig.java | 78 ++++++++----------- 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java b/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java index 91d898c..c47781b 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java @@ -1,45 +1,31 @@ package kr.xit.core.spring.config; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import java.util.*; import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; +import javax.servlet.*; +import javax.servlet.http.*; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.*; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.Ordered; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter; -import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; -import org.springframework.web.filter.CommonsRequestLoggingFilter; -import org.springframework.web.method.support.HandlerMethodArgumentResolver; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.config.annotation.CorsRegistry; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -import org.springframework.web.servlet.i18n.SessionLocaleResolver; +import org.springframework.boot.autoconfigure.condition.*; +import org.springframework.boot.web.servlet.*; +import org.springframework.context.annotation.*; +import org.springframework.core.*; +import org.springframework.http.converter.*; +import org.springframework.http.converter.xml.*; +import org.springframework.web.filter.*; +import org.springframework.web.method.support.*; +import org.springframework.web.servlet.*; +import org.springframework.web.servlet.config.annotation.*; +import org.springframework.web.servlet.i18n.*; import kr.xit.core.consts.Constants; -import kr.xit.core.spring.config.auth.AuthentificationInterceptor; -import kr.xit.core.spring.config.properties.CorsProperties; -import kr.xit.core.spring.filter.LoggingFilter; -import kr.xit.core.spring.filter.ReadableRequestWrapperFilter; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; +import kr.xit.core.spring.config.auth.*; +import kr.xit.core.spring.config.properties.*; +import kr.xit.core.spring.filter.*; +import lombok.*; +import lombok.extern.slf4j.*; /** *
@@ -96,18 +82,18 @@ public class WebMvcConfig implements WebMvcConfigurer {
         //converters.forEach(System.out::println);
     }
 
-    @Override
-    public void addInterceptors(InterceptorRegistry registry) {
-        registry.addInterceptor(new AuthentificationInterceptor())
-            .addPathPatterns("/**/*")
-            .excludePathPatterns(
-                "/api/core/*",
-                "/swagger-ui.html",
-                "/swagger-ui/*",
-                "/api-docs/*"
-            );
-        registry.addInterceptor(localeChangeInterceptor());
-    }
+    // @Override
+    // public void addInterceptors(InterceptorRegistry registry) {
+    //     registry.addInterceptor(new AuthentificationInterceptor())
+    //         .addPathPatterns("/**/*")
+    //         .excludePathPatterns(
+    //             "/api/core/*",
+    //             "/swagger-ui.html",
+    //             "/swagger-ui/*",
+    //             "/api-docs/*"
+    //         );
+    //     registry.addInterceptor(localeChangeInterceptor());
+    // }
 
     // -------------------------------------------------------------
     // RequestMappingHandlerMapping 설정 View Controller 추가