Spring RESTful Services

Assess your ability to design and implement REST APIs with Spring MVC.

1. Which annotation is used to mark a class as a REST controller in Spring, combining @Controller and @ResponseBody?
2. What HTTP method is typically associated with the @PostMapping annotation in Spring?
3. Which annotation is used to extract a path variable from the URL in a Spring REST method?
4. What is the default response format for a Spring REST controller method returning a Java object?
5. Which Spring Boot starter is required to build RESTful web services?
6. What HTTP status code is returned by default when a Spring REST resource is not found?
7. Which annotation is a shortcut for @RequestMapping(method = RequestMethod.GET)?
8. Which class is the entry point for a Spring Boot REST application?
9. Which HTTP methods are typically used for modifying resources in RESTful services? (Select all that apply)
10. Which Spring annotations can be used to handle request data? (Select all that apply)
11. Which are valid HTTP status codes for successful REST responses? (Select all that apply)
12. Which features does Spring Boot provide to simplify REST development? (Select all that apply)
13. Which exceptions can Spring REST handle using @ExceptionHandler? (Select all that apply)
14. @RestController includes @ResponseBody, so methods in a @RestController do not need explicit @ResponseBody.
15. Spring Boot requires explicit configuration of Jackson for JSON serialization in REST controllers.
16. @RequestMapping can be applied at both class and method levels to define URL paths.
17. The @ResponseStatus annotation can only set status codes for successful responses.
18. What does REST stand for in the context of web services?
19. Name the annotation used to inject the HTTP request body into a method parameter (abbrev.)
20. What property in application.properties configures the port of a Spring Boot REST application?
Answered 0 of 0 — 0 correct