-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Document Welcome Page support ordering #34846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure that we can change this in a maintenance release for the same reasons that you don't want to re-order I wonder if Framework 6.1 could consider introducing relative ordering support rather than relying on the current, rather brittle, absolute values? It's served us very well for Boot's auto-configuration. |
WelcomePageHandlerMapping
has higher priority than RouterFunctionMapping
I will discuss that with the Framework team and let you know if the rest of the team is ok with that. |
@sdeleuze Any update from the Framework team? |
We have discussed this topic in this week Spring Framework team meeting, the follow-up discussion is still ongoing. I will post an update here as soon as we have reached a consensus (should happen shortly). |
As mentioned in spring-framework#30278:
This change will likely solve in Spring Boot 3.2 the original issue reported here. Solving it in Spring Boot 3.1 would require changing the
That would be a distinct new feature that would require careful design consideration, so unlikely to be shipped as part of Spring Framework 6.1 given our current priorities. |
I've tested successfully the Spring Framework change from spring-projects/spring-framework#30278 - the custom Let's rework this issue as a documentation one to properly document the ordering in the welcome page section of web frameworks. |
Uh oh!
There was an error while loading. Please reload this page.
When using WebMvc.fn, the order of the registered mapping is:
RequestMappingHandlerMapping
(order 0, set by Framework)WelcomePageHandlerMapping
(order 2, set by Boot)RouterFunctionMapping
(order 3, set by Framework)Which leads to the surprising behavior that a
RouterFunction
define a user provided mapping on/
to render aindex
template will be shadowed byWelcomePageHandlerMapping
serving this template. In my case, that half broke the rendering by skipping the model attributes that were set in the handler.After a discussion with the Spring Framework team, we are going to try to improve the consistency between WebFlux (which has
RouterFunctionMapping
beforeRequestMappingHandlerMapping
) and WebMvc (where this is the opposite) if possible (see spring-projects/spring-framework#30278) but we can't change that in a 5.3 or 6.0 patch release.But I think I would be great if possible to fix Spring Boot 3.0 and potentially 2.7 to have
WelcomePageHandlerMapping
afterRouterFunctionMapping
.The text was updated successfully, but these errors were encountered: