spring mvc 自动配置spring boot 启动时会对 spring mvc 做自动配置,默认的配置功能在 org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration 中进行了说明。有以下功能:包含 ContentNegotiatingViewResolver 和 BeanNameViewResolverContentNegotiatingViewResolverBeanNameViewResolver支持对静态资源自动注册Converter,GenericConverter和FormatterConverterGenericConverterFormatterSupport for HttpMessageConverters (covered later in this document).自动注册MessageCodesResolver支持静态欢迎首页index.html支持自定义 favicon 图标自动使用ConfigurableWebBindingInitializer