feat: 전자고지 대상 엑셀 업로드 테스트 페이지 추가

dev
gitea-관리자 1 year ago
parent 2bbedc4bec
commit 98764f06eb

@ -18,6 +18,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.web.filter.CommonsRequestLoggingFilter; import org.springframework.web.filter.CommonsRequestLoggingFilter;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@ -39,7 +40,7 @@ import lombok.RequiredArgsConstructor;
* - AuthentificationInterceptor : * - AuthentificationInterceptor :
* - CommonsRequestLoggingFilter : request logging * - CommonsRequestLoggingFilter : request logging
* - ReadableRequestWrapperFilter : post logging * - ReadableRequestWrapperFilter : post logging
* - SimpleCORSFilter : cors * - CORS
* packageName : kr.xit.core.spring.config * packageName : kr.xit.core.spring.config
* fileName : WebMvcConfig * fileName : WebMvcConfig
* author : julim * author : julim
@ -73,7 +74,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
.addPathPatterns("/**/*") .addPathPatterns("/**/*")
.excludePathPatterns( .excludePathPatterns(
"/api/core/*" "/api/core/*"
// "/api/v1/kakaopay/*"
); );
} }
@ -165,42 +165,18 @@ public class WebMvcConfig implements WebMvcConfigurer {
* CORS Filter * CORS Filter
* @return * @return
*/ */
@Bean @Override
public FilterRegistrationBean simpleCorsFilter() { public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/batch/**")
SimpleCORSFilter corsFilter = new SimpleCORSFilter(); .allowedOrigins(corsProperties.getAllowedOrigins().split(","))
FilterRegistrationBean bean = new FilterRegistrationBean(corsFilter); .allowedMethods(corsProperties.getAllowedMethods().split(","))
bean.setOrder(Ordered.LOWEST_PRECEDENCE); .allowedHeaders(corsProperties.getAllowedHeaders().split(","))
bean.addUrlPatterns(Constants.API_URL_PATTERNS); .allowCredentials(corsProperties.getAllowCredentials())
return bean; .maxAge(corsProperties.getMaxAge())
.exposedHeaders(corsProperties.getExposeHeader());
// CorsConfiguration config = new CorsConfiguration();
// config.setAllowedOrigins(Collections.singletonList(corsProperties.getAllowedOrigins()));
// config.setAllowedMethods(Collections.singletonList(corsProperties.getAllowedMethods()));
// config.setAllowedHeaders(Collections.singletonList(corsProperties.getAllowedHeaders()));
// config.setAllowCredentials(corsProperties.getAllowCredentials());
// config.setMaxAge(corsProperties.getMaxAge());
// config.setExposedHeaders(Collections.singletonList(corsProperties.getExposeHeader()));
//
// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
// source.registerCorsConfiguration("/**", config);
//
// FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
// bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
// return bean;
} }
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// //WebMvcConfigurer.super.addCorsMappings(registry);
// registry.addMapping("/**")
// .allowedOrigins(String.valueOf(Collections.singletonList(corsProperties.getAllowedOrigins())))
// .allowedMethods(String.valueOf(Collections.singletonList(corsProperties.getAllowedMethods())));
// }
// /** // /**
// * HandlerExceptionResolver 를 상속받은 resolver 등록 // * HandlerExceptionResolver 를 상속받은 resolver 등록
// * @param resolvers the list of configured resolvers to extend // * @param resolvers the list of configured resolvers to extend

Loading…
Cancel
Save