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
- Custom HandlerMapping
- Custom HandlerAdapter
- Custom ViewResolver
- Custom Argument Resolver
- HandlerMethodArgumentResolver
- Custom Return Value Handler
- HandlerMethodReturnValueHandler
- Custom Formatter
- Custom Interceptor
- Custom Exception Resolver
- Custom Message Converter
- Custom Annotation
- Request Lifecycle Customization
- Mini Project: Asynchronous Requests: Callable, DeferredResult and Server-Sent Events