Skip to content

Make SessionLocaleResolver's attribute name configurable [SPR-15450] #20011

Closed

Description

@spring-projects-issues

Mercy Ma opened SPR-15450 and commented

I used org.springframework.web.servlet.i18n.SessionLocaleResolver to resolve LocaleContext , and found the attribute name of HttpSession is a constant value ( String LOCALE_SESSION_ATTRIBUTE_NAME = SessionLocaleResolver.class.getName() + ".LOCALE";) , and it still can't be changed in latest version of Spring WebMVC, thus , Is possible to change the attribute name of HttpSession for SessionLocaleResolver ?


Affects: 4.3.7

Reference URL: https://github.com/spring-projects/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java

Issue Links:

Referenced from: commits cec36fe, 421fabb

Activity

  1. spring-projects-issues commented on Apr 13, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Good point! I've introduced corresponding setLocaleAttributeName and setTimeZoneAttributeName methods on SessionLocaleResolver, allowing for customization, and will backport those to 4.3.8 as well.

  2. added
    type: enhancement
    in: web
    on Jan 11, 2019
  3. added this to the 4.3.8 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions