In order to improve GraalVM compatibility (by requiring less reflection configuration) and for the sake of consistency, we should probably register these 4 missing beans in WebMvcConfigurationSupport: - org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver - org.springframework.web.servlet.theme.FixedThemeResolver - org.springframework.web.servlet.support.SessionFlashMapManager - org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator

We should also make sure the same is done on XML side and should then make DispatcherServlet.properties parsing lazy as most use case will not use it.

Finally, we should check that no Spring Boot configuration update is needed.

Comment From: mdeinum

I have a branch that includes these additional beans in both Java and XML configuration. I can provide a pull request if you like?

I was still pondering on the lazy loading. This kind of mechanism is used on other places as well, would it make sense to extract to loading of default strategies to a standalone class, for reuse in other places as well?

Comment From: sdeleuze

@mdeinum Sure thanks, feel free to create a PR for that. I already implemented lazy loading via https://github.com/spring-projects/spring-framework/commit/e2944c37e4097eafddd61a20038bff1a6e9c4097.

Comment From: sdeleuze

After a deeper look I think there is a 4th bean to add: org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.

Comment From: mdeinum

Pull request added.

I considered adding a test to check if all the defaults have been added (1 for XML and 1 for Java), not sure if that would make sense or be helpful?

Comment From: sdeleuze

I think this is ok as provided in your PR, thanks.

Comment From: rstoyanchev

Superseded by #25260.