Custom Formatter
Learn Custom Formatter (Advanced Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes Formatter converts between a String and an object in both directions, using the Locale : parse(String, Locale) and print(T, Locale) . Use it for request parameters, form fields and view output of types such as money, phone numbers or dates. Register with FormatterRegistry.addFormatter inside WebMvcConfigurer.addFormatters .
More lessons in Advanced Spring MVC
- Custom HandlerMapping
- Custom HandlerAdapter
- Custom ViewResolver
- Custom Argument Resolver
- HandlerMethodArgumentResolver
- Custom Return Value Handler
- HandlerMethodReturnValueHandler
- Custom Converter
- Custom Interceptor
- Custom Exception Resolver
- Custom Message Converter
- Custom Annotation
- Request Lifecycle Customization
- Mini Project: Asynchronous Requests: Callable, DeferredResult and Server-Sent Events