Skip to content

Commit

Permalink
add spring/6
Browse files Browse the repository at this point in the history
  • Loading branch information
deepraining committed Oct 20, 2021
1 parent 8d81812 commit 76780b2
Show file tree
Hide file tree
Showing 3 changed files with 1,173 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
1. [\[2021-10-14\] Spring 源码解析三:Bean 的注册、解析、实例化机制](spring/3.md)
1. [\[2021-10-14\] Spring 源码解析四:Bean 的构造装载、属性值解析、注解扫描](spring/4.md)
1. [\[2021-10-19\] Spring 源码解析五:Bean 的配置、定义、注册](spring/5.md)
1. [\[2021-10-20\] Spring 源码解析六:处理器映射与处理器适配处理](spring/6.md)

## 前端进阶

Expand Down
35 changes: 23 additions & 12 deletions spring/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,6 @@ public class DispatcherServlet extends FrameworkServlet {
文件(开发者不能自定义覆盖)如下:

```properties
# Default implementation classes for DispatcherServlet's strategy interfaces.
# Used as fallback when no matching beans are found in the DispatcherServlet context.
# Not meant to be customized by application developers.

org.springframework.web.servlet.LocaleResolver=org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver

org.springframework.web.servlet.ThemeResolver=org.springframework.web.servlet.theme.FixedThemeResolver
Expand Down Expand Up @@ -868,14 +864,29 @@ org.springframework.web.servlet.FlashMapManager=org.springframework.web.servlet.

`DispatcherServlet.properties` 文件中指明:

-`AcceptHeaderLocaleResolver` 作为默认的本地化解析器
-`FixedThemeResolver` 作为默认的主题解析器
-`BeanNameUrlHandlerMapping, RequestMappingHandlerMapping, RouterFunctionMapping` 作为默认的处理器映射组件
-`HttpRequestHandlerAdapter, SimpleControllerHandlerAdapter, RequestMappingHandlerAdapter, HandlerFunctionAdapter` 作为默认的处理器适配组件
-`ExceptionHandlerExceptionResolver, ResponseStatusExceptionResolver, DefaultHandlerExceptionResolver` 作为默认的处理器异常解析器
-`DefaultRequestToViewNameTranslator` 作为默认的视图查找处理器
-`InternalResourceViewResolver` 作为默认的视图解析器
-`SessionFlashMapManager` 作为默认的内存暂存 session 数据管理器
-[AcceptHeaderLocaleResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java)
作为默认的本地化解析器
-[FixedThemeResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java)
作为默认的主题解析器
-[BeanNameUrlHandlerMapping](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMapping.java)
[RequestMappingHandlerMapping](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java)
[RouterFunctionMapping](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java)
作为默认的处理器映射组件
-[HttpRequestHandlerAdapter](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/HttpRequestHandlerAdapter.java)
[SimpleControllerHandlerAdapter](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleControllerHandlerAdapter.java)
[RequestMappingHandlerAdapter](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java)
[HandlerFunctionAdapter](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/HandlerFunctionAdapter.java)
作为默认的处理器适配组件
-[ExceptionHandlerExceptionResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java)
[ResponseStatusExceptionResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java)
[DefaultHandlerExceptionResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java)
作为默认的处理器异常解析器
-[DefaultRequestToViewNameTranslator](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java)
作为默认的视图查找处理器
-[InternalResourceViewResolver](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceViewResolver.java)
作为默认的视图解析器
-[SessionFlashMapManager](https://github.com/spring-projects/spring-framework/blob/v5.3.10/spring-webmvc/src/main/java/org/springframework/web/servlet/support/SessionFlashMapManager.java)
作为默认的内存暂存 session 数据管理器

##### 3.6.1.2. DispatcherServlet.initHandlerAdapters

Expand Down
Loading

0 comments on commit 76780b2

Please sign in to comment.