Announcement Announcement Module
Collapse
No announcement yet.
How to set setAttributeNamePrefix(Strin) of DefaultSessionAttributeStore dynamically? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set setAttributeNamePrefix(Strin) of DefaultSessionAttributeStore dynamically?

    Hi,

    I want to set prefix of sessionAttribute that is in controller dynamically.
    I read JavaDoc of DefaultSessionAttributeStore and found the method public void setAttributeNamePrefix(String attributeNamePrefix).
    I know the way to set the prefix statically but I could not find dynamic way.

    When I use @SessionAttributes(value = "someAttribute") in controller, the key of the session attribute is the same as the attribute variable name. Sometimes the key could be conflict to other controller's sessionAttribute. So I want to add controller class name or something as the key prefix automatically.

    Any advice?
Working...
X