diff --git a/src/main/java/com/example/goorm/WebMvcConfig.java b/src/main/java/com/example/goorm/WebMvcConfig.java index d55f0a8..e7ca745 100644 --- a/src/main/java/com/example/goorm/WebMvcConfig.java +++ b/src/main/java/com/example/goorm/WebMvcConfig.java @@ -3,6 +3,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @@ -11,7 +12,18 @@ public class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:3000/", "https://9oorm-oreum-frontend.vercel.app/") - .allowedMethods("GET", "POST"); + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("*") + .allowCredentials(true) + .maxAge(3600L); + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); } } diff --git a/src/main/java/com/example/goorm/oreum/CsvWriter.java b/src/main/java/com/example/goorm/oreum/CsvWriter.java index d91f4fe..cc47548 100644 --- a/src/main/java/com/example/goorm/oreum/CsvWriter.java +++ b/src/main/java/com/example/goorm/oreum/CsvWriter.java @@ -11,13 +11,13 @@ // //@Configuration //@RequiredArgsConstructor -//public class CsvWriter implements ItemWriter { +//public class CsvWriter implements ItemWriter { //// private final OreumRepository oreumRepository; // // private final TestRepository testRepository; // // @Override -// public void write(List list) throws Exception { -// oreumRepository.saveAll(new ArrayList(list)); +// public void write(List list) throws Exception { +// testRepository.saveAll(new ArrayList(list)); // } //} \ No newline at end of file