Skip to main content

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