spring boot 启动时会对 spring mvc 做自动配置,默认的配置功能在 org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
中进行了说明。有以下功能:
包含 ContentNegotiatingViewResolver
和 BeanNameViewResolver
ContentNegotiatingViewResolver BeanNameViewResolver
自动注册 Converter
, GenericConverter
和 Formatter
Converter GenericConverter Formatter
MessageCodesResolver
index.html
ConfigurableWebBindingInitializer