Skip to main content

Custom Message Converter

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

Fresher Notes Custom converter : a class that teaches Spring MVC to read or write a Java type in a media type it does not know, such as CSV. Base class : extend AbstractHttpMessageConverter<T> and implement supports , readInternal and writeInternal . Registration : add it in WebMvcConfigurer.extendMessageConverters so the default converters stay in place.

More lessons in HTTP Message Converters