Which two statements are true about @Controller annotated classes? (Choose two.)
Which two statements are true about @Controller annotated classes? (Choose two.)
The @Controller annotated classes are eligible for handling requests in Spring MVC. This annotation indicates that a particular class serves the role of a controller in an MVC pattern, receiving web requests and returning a view or data. Additionally, @Controller is considered a stereotype annotation, similar to @Component, meaning it marks the class as a Spring-managed component. This allows for automatic detection through component scanning mechanisms. The other options contain inaccuracies: @Controller annotated classes can do more than just render views, they do not need to be paired with @EnableMvcMappings to be discovered via component scanning, and @Controller is not interchangeable with @RestController without extra considerations because @RestController combines @Controller and @ResponseBody.
correct