The @Controller annotation in Spring Boot is typically used in conjunction with the _____ annotation to handle HTTP requests.
- @RequestController
- @RestController
- @HTTPController
- @HTTPHandler
The @Controller annotation in Spring Boot is typically used in conjunction with the @RestController annotation to handle HTTP requests. The @RestController annotation combines the functionality of the @Controller and @ResponseBody annotations, allowing you to define RESTful web services. @RequestController and the other options are not standard Spring annotations for this purpose.
Loading...
Related Quiz
- In Spring Boot, which framework is primarily used for mocking objects in unit tests?
- The @WebMvcTest annotation in Spring Boot will _____ any @Component, @Service, and @Repository beans by default.
- Which of the following is true regarding the @SpringBootTest annotation when testing Spring Boot applications?
- How can you access a defined property in the application properties file within a Spring Boot application class?
- In what scenarios would you choose to implement a custom validator instead of using the standard Bean Validation annotations?