I read javadoc about @EnableWebMvc
.
But I don't understand what this annotation mean?
Can you expalin it clearly?
See Question&Answers more detail:osI read javadoc about @EnableWebMvc
.
But I don't understand what this annotation mean?
Can you expalin it clearly?
See Question&Answers more detail:osWhen you're using Java code (as opposed to XML) to configure your Spring application, @EnableWebMvc
is used to enable Spring MVC. If you're not already familiar with Spring's support for Java configuration, this is a good place to start.
@EnableWebMvc
is equivalent to <mvc:annotation-driven />
in XML. It enables support for @Controller
-annotated classes that use @RequestMapping
to map incoming requests to a certain method. You can read detailed information about what it configures by default and how to customise the configuration in the reference documentation.