I Cretae one springboot(2.0.6.RELEASE) and put in my application.yml the configuration:
jackson:
date-format: dd/MM/yyyy
so when my user call my API every date return just like this:
"vencimento": "01/07/2017"
so, now I put an CORS in my project
@Configuration
@EnableWebMvc
public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
}
but now, all my date filed return just like this:
"vencimento": [
2017,
1,
7
],
anyone know why? and how to fix this? tks
@EnableWebMvcin a Spring Boot app you switch off the default settings in the framework, so maybe you should avoid that.