As you know, Spring-MVC will expect a <
This means that in order to use <mvc:annotation-driven />
- The servlet XML now needs to contain <mvc:annotation-driven />
and be able to detect the @Controller objects so it can refer to the metadata in those controllers to use (e.g. via <context:component-scan /> ). All these within the same XML file or via imports.
- The root XML needs to have the declarations as mentioned above (<mvc:annotation-driven />
For further reading of this new features, take a look at JIRA issue SPR-6524 where Jurgen Hoeller and Keith Donald explain their thoughts on why <mvc:annotation-driven /> is supposed to behave like this.
Hopefully this helps some!