Spring MVC 环境搭建 3 --> 4 HandlerMapping、HandlerAdapter修改

refer:  http://blog.csdn.net/chiperfect/article/details/47124705
 
Spring MVC 3 升级到SpringMvc 4   HandlerMapping、HandlerAdapter修改
 配置HandlerMapping、HandlerAdapter

         <beanclass="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>

         <bean       class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

上面两个过时,可使用下面配置(主要是针对注解配置@RequestMapping)

    <beanclass="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>

<bean     class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"/>

你可能感兴趣的:(springMVC)