Close
« Tutorial

Spring MVC - XML Message Conversion MCQ

0/13
0 ✓
0 ✗

1. Which HTTP header value tells Spring MVC that the request body contains XML?

2. Which Spring MVC strategy interface converts HTTP request and response bodies to Java objects and back?

3. Is XML message conversion available in Spring MVC without any extra library?

4. Which annotation on a handler method parameter converts the HTTP request body into a Java object?

5. Which annotation tells Spring MVC to write the return value of a handler method directly to the HTTP response body?

6. Which library must be added to the classpath so that Spring can convert XML using Jackson?

7. After the Jackson XML library is added to the classpath, what extra Spring configuration is needed to register the XML converter?

8. In Spring 7.0, which converter replaces the deprecated MappingJackson2XmlHttpMessageConverter?

9. Why must JAXB be added as an external dependency in newer Java versions?

10. Which converter is recommended when you already use the Marshaller and Unmarshaller abstractions from spring-oxm?

11. Which @RequestMapping attribute limits a handler method to requests that have an XML request body?

12. Which @RequestMapping attribute makes a handler method return XML to clients that ask for XML?

13. Why is a list of objects often wrapped inside a separate class before it is returned as XML?

14. Which Jackson XML annotation can set the name of the root XML element for a Java class?

15. If JAXB is used for XML conversion, what kind of annotations are used on the Java classes?

Join