Jokes aside, I'd say B and E are the clear winners here. The @Controller is a core Spring MVC annotation, and it's indeed a stereotype like @Component. Gotta love that Spring ecosystem!
Haha, A is so wrong. The whole point of a @Controller is to handle requests, not just render views. Someone's been watching too much JSP code, I think.
I think C is a bit misleading. The @Controller classes don't need to be annotated with @EnableMvcMappings to be discovered via component scanning. That's just an extra configuration step.
Hmm, D is definitely not true. @Controller and @RestController are not interchangeable, as they serve different purposes. You can't just swap them without changing the method implementations.
B and E are the correct answers. The @Controller annotation is used to mark a class as a Spring MVC controller, which can handle requests in the Spring MVC framework. It's also a stereotype annotation like @Component.
Annett
2 months agoVeronika
2 months agoOretha
29 days agoVesta
2 months agoArthur
2 months agoMendy
3 months agoLizette
3 months agoKenneth
3 months agoLashawn
2 months agoLashawn
2 months agoElina
3 months agoMickie
3 months agoTori
2 months agoFidelia
2 months agoJesusita
2 months agoArthur
3 months ago