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.web.filter.CommonsRequestLoggingFilter;
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.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@ -39,7 +40,7 @@ import lombok.RequiredArgsConstructor;
* - AuthentificationInterceptor :
* - CommonsRequestLoggingFilter : request logging
* - ReadableRequestWrapperFilter : post logging
* - SimpleCORSFilter : cors
* - CORS
* packageName : kr.xit.core.spring.config
* fileName : WebMvcConfig
* author : julim
@ -73,7 +74,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
.addPathPatterns("/**/*")
.excludePathPatterns(
"/api/core/*"
// "/api/v1/kakaopay/*"
);
}
@ -165,42 +165,18 @@ public class WebMvcConfig implements WebMvcConfigurer {
* CORS Filter
* @return
*/
@Bean
public FilterRegistrationBean simpleCorsFilter() {
SimpleCORSFilter corsFilter = new SimpleCORSFilter();
FilterRegistrationBean bean = new FilterRegistrationBean(corsFilter);
bean.setOrder(Ordered.LOWEST_PRECEDENCE);
bean.addUrlPatterns(Constants.API_URL_PATTERNS);
return bean;
// 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) {
registry.addMapping("/batch/**")
.allowedOrigins(corsProperties.getAllowedOrigins().split(","))
.allowedMethods(corsProperties.getAllowedMethods().split(","))
.allowedHeaders(corsProperties.getAllowedHeaders().split(","))
.allowCredentials(corsProperties.getAllowCredentials())
.maxAge(corsProperties.getMaxAge())
.exposedHeaders(corsProperties.getExposeHeader());
}
// @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 등록
// * @param resolvers the list of configured resolvers to extend

Loading…
Cancel
Save