---
title: "sping DefaultAnnotationHandlerMapping "
author: "kkcheng"
date: "2012-03-22T22:15:58Z"
tags: []
categories: ["编程语言"]
slug: "sping-defaultannotationhandlermapping"
draft: false
lastmod: "2012-03-22T22:15:58Z"
id: 1461974
url: "https://kkcheng.iteye.com/blog/1461974"
---

If you define custom HandlerMapping beans in your DispatcherServlet context, you need to add a DefaultAnnotationHandlerMapping bean explicitly, since custom HandlerMapping beans replace the default mapping strategies. Defining a DefaultAnnotationHandlerMapping also allows for registering custom interceptors: 