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
5 months agoVeronika
5 months agoOretha
4 months agoVesta
5 months agoArthur
5 months agoMendy
6 months agoLizette
6 months agoKenneth
6 months agoLashawn
5 months agoLashawn
5 months agoElina
6 months agoMickie
6 months agoTori
5 months agoFidelia
5 months agoJesusita
5 months agoArthur
6 months ago