Skip to content

Provide properties to configure WebFlux's locale and how it's resolved #23449

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

Closed
wilkinsona opened this issue Sep 22, 2020 · 4 comments
Closed
Assignees
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented Sep 22, 2020

MVC has locale and locale-resolver properties that control the locale and how it's resolved (fixed or via the Accept-Language header). We should offer the same with WebFlux.

@wilkinsona
Copy link
Member Author

wilkinsona commented Sep 22, 2020

This would give us the following properties:

  • spring.mvc.locale
  • spring.mvc.locale-resolver
  • spring.webflux.locale
  • spring.webflux.locale-resolver

The properties would behave the same with both WebFlux and MVC. We could, perhaps, consider common properties that work with both web stacks. That would align with, for example, spring.resources.* that both MVC and WebFlux consume.

@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Sep 22, 2020
@philwebb
Copy link
Member

We're going to try:

spring.web.locale-resolver=fixed
spring.web.locale=en_GB

We'll also consider moving spring.resources.* under it.

@philwebb philwebb removed the for: team-attention An issue we'd like other members of the team to review label Sep 23, 2020
@wilkinsona wilkinsona self-assigned this Oct 27, 2020
@wilkinsona
Copy link
Member Author

I've opened #23917 for the spring.resources.* move.

@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.4.0-RC1 Oct 27, 2020
@wilkinsona
Copy link
Member Author

This issue is noteworthy due to the deprecation of the spring.mvc.locale and spring.mvc.locale-resolver properties.

@wilkinsona wilkinsona added the status: noteworthy A noteworthy issue to call out in the release notes label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants