71.6 Switch off the Spring MVC DispatcherServlet
Spring Boot wants to serve all content from the root of your application /
down. If you would rather map your own servlet to that URL you can do it, but of course you may lose some of the other Boot MVC features. To add your own servlet and map it to the root resource just declare a @Bean
of type Servlet
and give it the special bean name dispatcherServlet
(You can also create a bean of a different type with that name if you want to switch it off and not replace it).