Where did springboot complete the configuration of Servlet and Filter in SpringMvc?

cannot find the configuration point for the web project, version is 2.0.5.RELEASE

Jul.30,2021

Spring Boot provides automatic configuration for Spring MVC, including view parser, static resource processing, type converter and formatter, HTTP message converter, static home page support, and so on. This configuration information is done in the WebMvcAutoConfiguration configuration class, as shown below.

Spring Boot 2.0 WebMvcConfigurerAdapter Spring MVC WebMvcConfigurer

Spring Boot 2.0 WebMvcConfigurerAdapter WebMvcConfigurer default WebMvcConfigurer jdk1.8

the following is a demo that configures the interceptor based on the above version of Spring Boot2.0

Custom interceptor class MyHandlerInterceptor

@Configuration
public class WebConfiguration implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyHandlerInterceptor()).addPathPatterns("/**");
    }
}
Menu