Skip to main content

Formatters

Learn Formatters (Data Binding, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Formatter : a Spring SPI ( org.springframework.format.Formatter<T> ) that converts between a String and an object, in both directions, using the request Locale . Built-in formatters handle dates, numbers and currency through @DateTimeFormat and @NumberFormat on fields and parameters. Why not only converters : a converter is locale-free, while a formatter parses and prints text for humans, such as 12/05/2026 or 1,234.50.

More lessons in Data Binding