Announcement Announcement Module
Collapse
No announcement yet.
controller member variables Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • controller member variables

    i've read that you should not change the value of any member variables in a controller because controllers in spring are singletons. is there anything else i should avoid?

  • #2
    Member variables

    I've never had any use cases that required me to put a member variable in a Spring MVC controller. By all means, put member variables there if you need 'em, but be sure to make access thread safe.
    What you should avoid... hard to tell. You should definitely look up the example apps and try to follow their examples.

    Good luck!

    Comment

    Working...
    X