在什么情况下用annotation-driven

<mvc:annotation-driven/>会自动注册

RequestMappingHandlerMapping

RequestMappingHandlerAdapter

ExceptionHandlerExceptionResolver三个bean

当使用<mvc:view-controller>标签 RequestMapping标签就会不好用 就需要配置annotation-driven

为了解决mvc处理静态资源的问题 <mvc:default-servlet-handler>RequestMapping标签就会又不好用 就需要配置annotation-driven





扫描二维码关注公众号,回复: 3379685 查看本文章



猜你喜欢

转载自blog.csdn.net/weixin_41050814/article/details/79554122