Close
« Tutorial

Spring MVC - HTTP PUT with XML Body MCQ

0/13
0 ✓
0 ✗

1. Which annotation completes this handler method so it accepts HTTP PUT requests?

// Add annotation here
public String update() { ... }

2. Which annotation tells Spring MVC to convert the HTTP request body into a method parameter?

3. Which HTTP request header tells the server that the request body is in XML format?

4. What Content-Type value should a client send with an XML body?

5. Which Spring component converts an XML request body into a Java object?

6. What must be on the classpath so Spring MVC can convert XML to Java objects using Jackson?

7. How does Spring MVC choose the converter to read a request body?

8. Which HTTP status code does Spring MVC typically return when no converter supports the request's Content-Type?

9. Which HTTP methods can a standard HTML form submit directly?

10. What is an HTTP PUT request normally used for?

11. Which annotation reads the id value from a URL template like /items/{id}?

12. What does @ResponseBody do on a handler method?

13. How does Jackson normally match XML elements to properties of a Java object?

14. Which annotation on a configuration class enables Spring MVC features, including default message converters?

15. Which curl option sets the HTTP method to PUT?

Join