SpringMVC自动配置
SpringMVC自动配置概览
Spring Boot provides auto-configuration for Spring MVC that works well with most applications.(大多场景我们都无需自定义配置)
The auto-configuration adds the following features on top of Spring’s defaults:
- Inclusion of
ContentNegotiatingViewResolverandBeanNameViewResolverbeans.
- 内容协商视图解析器和BeanName视图解析器
- Support for serving static resources, including support for WebJars (covered later in this document)).
- 静态资源(包括webjars)
- Automatic registration of
Converter,GenericConverter, andFormatterbeans.
- 自动注册
Converter,GenericConverter,Formatter
- Support for
HttpMessageConverters(covered later in this document).
- 支持
HttpMessageConverters(后来我们配合内容协商理解原理)
- Automatic registration of
MessageCodesResolver(covered later in this document).
- 自动注册
MessageCodesResolver(国际化用)
- Static
index.htmlsupport.
- 静态index.html 页支持
- Custom
Faviconsupport (covered later in this document).
- 自定义
Favicon
- Automatic use of a
ConfigurableWebBindingInitializerbean (covered later in this document).
- 自动使用
ConfigurableWebBindingInitializer,(DataBinder负责将请求数据绑定到JavaBean上)

浙公网安备 33010602011771号