Skip to main content

Custom Converter

Learn Custom Converter (Advanced Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Converter is a functional interface Converter<S, T> with one method T convert(S source) ; Spring uses it to turn one type into another, such as String into your own class. Register with registry.addConverter in WebMvcConfigurer.addFormatters . Where used : @RequestParam , @PathVariable , @ModelAttribute binding and property placeholders.

More lessons in Advanced Spring MVC