SpringMVC 注意点小记

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011304490/article/details/85172179

一、不配置xml(注解、非注解) 的时候,springmvc框架会默认加载各种组件

org.springframework.web.servlet包中有个属性文件DispatcherServlet.properties。

前端控制器从上边的文件中加载处理映射器、适配器、视图解析器等组件,如果不额外配置,就默认加载文件里的

二、注解映射器、适配器版本

映射器:

在Spring3.1之前使用org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping注解映射器

在Spring3.1之后使用org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping注解映射器

适配器:

在Spring3.1之前使用org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter注解适配器

在Spring3.1之后使用org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter注解适配器

猜你喜欢

转载自blog.csdn.net/u011304490/article/details/85172179