Skip to content
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

Align DispatcherServlet defaults for Java and XML #25260

Closed
wants to merge 1 commit into from

Conversation

mdeinum
Copy link
Contributor

@mdeinum mdeinum commented Jun 17, 2020

Prior to this commit some of the default strategies defined
for the DispatcherServlet weren't included in the default
configuration for both Java and XML configuration.

The following default beans have been added to the configuration
with the name as expected by the DispatcherServlet:

  • org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
  • org.springframework.web.servlet.theme.FixedThemeResolver
  • org.springframework.web.servlet.support.SessionFlashMapManager
  • org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator

Fixes: gh-25209

Prior to this commit some of the default strategies defined
for the DispatcherServlet weren't included in the default
configuration for both Java and XML configuration.

The following default beans have been added to the configuration
with the name as expected by the DispatcherServlet:

. org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
. org.springframework.web.servlet.theme.FixedThemeResolver
. org.springframework.web.servlet.support.SessionFlashMapManager
. org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator

Fixes: spring-projectsgh-25209
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 17, 2020
@sdeleuze sdeleuze self-assigned this Jun 18, 2020
@sdeleuze sdeleuze removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 18, 2020
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 18, 2020
@sdeleuze
Copy link
Contributor

Merged via bad81ce, thanks for your contribution, much appreciated.

@sdeleuze sdeleuze closed this Jun 18, 2020
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 22, 2020
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jun 22, 2020

This can impact existing applications, on the Java config side in particular, that already define those beans in order to customize them or to choose the implementation.

One of them at least is defined in Spring Boot. As far as I can see this will suppress use of the spring.mvc.locale property.

@sdeleuze
Copy link
Contributor

Indeed this is tracked by #25290, I am working on a fix.

@rstoyanchev
Copy link
Contributor

Okay, I missed that. I guess I'll close this one then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align DispatcherServlet defaults for Java and XML
4 participants