|
|
|
@ -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.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <pre>
|
|
|
|
@ -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 추가
|
|
|
|
|