---
title: "<mvc:annotation-driven />所引发的问题"
author: "zdc243"
date: "2016-02-20T22:18:35Z"
tags: []
categories: ["企业架构"]
slug: "mvc-annotation-driven"
draft: false
lastmod: "2016-02-20T22:18:35Z"
id: 2277642
url: "https://zdc243.iteye.com/blog/2277642"
---

查看相关资料发现注册&lt;mvc:annotation-driven /&gt;后，相当于自动装配了AnnotationMethodHandlerAdapter和DefaultAnnotationHandlerMapping两个bean，所以不能重复定义，而且spring3.2后，这两个方法已经过期推荐使用RequestMappingHandlerMapping和RequestMappingHandlerAdapter两个类