---
title: "spring中的<mvc:annotation- driven/>"
author: "lalahei"
date: "2015-09-11T14:27:57Z"
tags: []
categories: ["编程语言"]
slug: "spring-mvc-annotation-driven"
draft: false
lastmod: "2015-09-11T14:27:57Z"
id: 2242703
url: "https://lalahei.iteye.com/blog/2242703"
---

3.1之后 spring自动注入 RequestMappingHandlerMapping RequestMappingHandlerAdapter

3.1之前 注入AnnotationMethodHandlerAdapte AnnotationMethodHandlerMapping 

 

没加 采用默认的配置

org.springframework.web.servlet.HandlerMapping=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,\\

org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping

 

org.springframework.web.servlet.HandlerAdapter=org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,\\

org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,\\

org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter

 

3.1之后AnnotationMethodHandlerAdapter DefaultAnnotationHandlerMapping 已经废弃不用了  建议使用最新API