I want to know is default handler mapping created by spring mvc framework override if we create our custom handler mapping. I have doubt because i created custom handler mapping in two projects in one
- BeanNameHandlerMapping
- SimpleUrlHandlerMapping is injected in dispatcher servlet but in another one these are not registered in dispatcher servlet
I am using different version of spring 3 framework for these two project. Is it because of version change in spring 3
I am not getting default handler mapping in spring 3.0 but getting in spring 3 higher version
Thanks
Specify the order of your custom
HandlerMapping
to have the lowest int value so that it gets tried first over the other registered HandlerMappings.Explanation
Figuring out the available HandlerMappings in the web context is part of the
DispatcherServlet
initialisation:That method, is discovering all the registered
HandlerMapping
s and as you can see it is sorting them based on their defined order.Otherwise it is falling back on the default handlerMapping: the
BeanNameUrlHandlerMapping