diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc index 7b1c23005c..fbae93af9c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc @@ -120,6 +120,21 @@ It first looks for an `index.html` file in the configured static content locatio If one is not found, it then looks for an `index` template. If either is found, it is automatically used as the welcome page of the application. +This only acts as a fallback for actual index routes defined by the application. +The ordering is defined by the order of `HandlerMapping` beans which is by default the following: + +[cols="1,1"] +|=== +|`RouterFunctionMapping` +|Endpoints declared with `RouterFunction` beans + +|`RequestMappingHandlerMapping` +|Endpoints declared in `@Controller` beans + +|`RouterFunctionMapping` for the Welcome Page +|The welcome page support +|=== + [[web.reactive.webflux.template-engines]] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc index c965ce1821..86ed5fbc32 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc @@ -196,6 +196,20 @@ It first looks for an `index.html` file in the configured static content locatio If one is not found, it then looks for an `index` template. If either is found, it is automatically used as the welcome page of the application. +This only acts as a fallback for actual index routes defined by the application. +The ordering is defined by the order of `HandlerMapping` beans which is by default the following: + +[cols="1,1"] +|=== +|`RouterFunctionMapping` +|Endpoints declared with `RouterFunction` beans + +|`RequestMappingHandlerMapping` +|Endpoints declared in `@Controller` beans + +|`WelcomePageHandlerMapping` +|The welcome page support +|=== [[web.servlet.spring-mvc.favicon]]