Prev Next

Spring / Spring7 basics Interview questions

What are the types of HTTP message converters in Spring?

HttpMessageConverter implementations translate between Java objects and HTTP request/response bodies, choosing a converter based on content type and target Java type.

ConverterHandles
MappingJackson2HttpMessageConverterJSON via Jackson
StringHttpMessageConverterPlain text bodies
FormHttpMessageConverterURL-encoded form data
MultipartHttpMessageConverterMultipart payloads (dedicated converter as of Spring 7.1)
ResourceHttpMessageConverterRaw byte/resource content, such as file downloads

Spring auto-registers a sensible default list, and you can add or replace converters through WebMvcConfigurer#extendMessageConverters when a project needs a custom format.

Which converter handles JSON bodies via Jackson?
Where can you customize or add HttpMessageConverters?

More Related questions...

What is Spring Framework 7? What is the minimum Java version required by Spring Framework 7? What is Jakarta EE 11 support in Spring Framework 7? What is Inversion of Control in Spring? What is Dependency Injection in Spring? What are the types of Dependency Injection in Spring? What is an ApplicationContext? What is a BeanFactory in Spring? What are Spring beans? What are the types of bean scopes in Spring? What is the purpose of the @Component annotation? What is the purpose of the @Autowired annotation? What is the purpose of the @Configuration annotation? What is the purpose of the @Bean annotation? What are stereotype annotations in Spring? What is component scanning in Spring? What is the BeanRegistrar contract introduced in Spring Framework 7? What is JSpecify in Spring Framework 7? What is the purpose of the @Value annotation? What are Spring profiles? Define a Spring Boot starter? What is auto-configuration in Spring Boot 4? What is the DispatcherServlet in Spring MVC? What is a RestController in Spring MVC? What is API Versioning support in Spring Framework 7? What are the types of HTTP message converters in Spring? Describe the RestClient in Spring Framework 7? What is the purpose of HTTP Interface clients in Spring? What are the types of Spring AOP advice? Define an Aspect in Spring AOP? What is the purpose of the @Transactional annotation? What are the types of transaction propagation in Spring? Describe AOT processing in Spring Framework 7? What is GraalVM native image support in Spring Framework 7? What is virtual thread support in Spring Framework 7? What is the purpose of a PropertySource in Spring? List the core modules of Spring Framework 7? Define a Spring MVC ViewResolver? What is the purpose of ResponseEntity? Describe the Spring Bean lifecycle basics?
Show more question and Answers...


Comments & Discussions