ExamGecko
Question list
Search
Search

Question 28 - 2V0-72.22 discussion

Report
Export

Which two statements are true about @Controller annotated classes? (Choose two.)

A.
The @Controller annotated classes can only render views.
Answers
A.
The @Controller annotated classes can only render views.
B.
The classes are eligible for handling requests in Spring MVC.
Answers
B.
The classes are eligible for handling requests in Spring MVC.
C.
The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.
Answers
C.
The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.
D.
@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.
Answers
D.
@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.
E.
The @Controller annotation is a stereotype annotation like @Component.
Answers
E.
The @Controller annotation is a stereotype annotation like @Component.
Suggested answer: B, E

Explanation:

Reference: https://www.baeldung.com/spring-mvc-handler-adapters

https://www.dineshonjava.com/stereotype-annotations-in-spring/

asked 16/09/2024
Hernan Rojas
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first