Skip to content

Spring Boot Welcome page handling

In Spring Boot, the handling of the welcome page is managed by the WelcomePageHandlerMapping, which is configured within the broader context of WebMvcAutoConfiguration^[600-developer__java__spring__thymeleaf__spring-thymeleaf-01.md].

Configuration

The welcome page handler is registered as a bean within the application context^[600-developer__java__spring__thymeleaf__spring-thymeleaf-01.md]. This configuration relies on several parameters to function correctly:

  • Application Context: It requires the ApplicationContext to check for template availability.
  • Welcome Page: It defines the specific resource to be served as the welcome page.
  • Static Path Pattern: It uses the static path pattern defined in the MVC properties (e.g., /**) to map the handler^[600-developer__java__spring__thymeleaf__spring-thymeleaf-01.md].
  • Spring Boot
  • [[Thymeleaf]]
  • [[WebMvcAutoConfiguration]]

Sources

^[600-developer__java__spring__thymeleaf__spring-thymeleaf-01.md]