Last active
April 27, 2020 07:57
-
-
Save CheolhoJeon/5c7ea4eca7b98ea0fa4f89442d11a770 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebMvc | |
public class MvcConfig implements WebMvcConfigurer { | |
... | |
@Override | |
public void extendMessageConverters(final List<HttpMessageConverter<?>> converters) { | |
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder | |
.json() | |
.simpleDateFormat("yyyyMMddHHmmss") // Date 타입 객체를 위한 변환 패턴 | |
.build(); | |
converters.add(0, new MappingJackson2HttpMessageConverter(objectMapper)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment