|
|
|
@@ -13,10 +13,7 @@ import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.http.converter.HttpMessageConverter; |
|
|
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
|
|
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver; |
|
|
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
|
|
|
import org.springframework.web.servlet.config.annotation.*; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigInteger; |
|
|
|
@@ -58,6 +55,15 @@ public class WebMvcConfig implements WebMvcConfigurer { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void addCorsMappings(CorsRegistry registry) { |
|
|
|
registry.addMapping("/api/**") |
|
|
|
.allowedOrigins("*") |
|
|
|
.allowCredentials(true) |
|
|
|
.allowedMethods("GET", "POST", "DELETE", "PUT") |
|
|
|
.maxAge(3600); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
|
|
|
MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(); |
|
|
|
|