I read javadoc about @EnableWebMvc.
@EnableWebMvc
But I don't understand what this annotation mean?
Can you expalin it clearly?
When 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.
<mvc:annotation-driven />
@Controller
@RequestMapping
1.4m articles
1.4m replys
5 comments
56.9k users