티스토리 뷰
Spring MVC WebMvcCongiturer_Formatter
- Formatter
- 해당 객체를 문자열로 출력 하거나, 어떤 문자열을 객체로 변환하여 받을수 있다.
- Formatter를 사용하려면 Formatter Interface를 구현해야 한다.
- Formatter Interface는 Printer 와, Parser 를 합친것이다.
- Formatter를 등록하는 방법
- WebMvcConfigurer의 addFormatters(FormatterRegistry) 메서드 정의
- 해당 Formatter를 빈으로 등록
- Spring boot 에서만 가능한 방법
'Spring' 카테고리의 다른 글
Spring MVC - Handler Interceptor (0) | 2019.07.15 |
---|---|
Spring - MVC DomainClassConverter (0) | 2019.07.14 |
Spring - MVC Spring Boot Mvc 설정 (0) | 2019.07.13 |
Spring - MVC WebMvcConfigurer (0) | 2019.07.12 |
Spring - MVC @EnableWebMvc (0) | 2019.07.11 |
댓글