Reputation:
I am new to Spring MVC and would like to know how it handles requests, more specifically:
Upvotes: 2
Views: 2154
Reputation: 597422
A controller (as any spring bean) has a scope.
At best your controllers should be of scope singleton
. In that case it is very much like servlets, and:
If your controller scope is request
or session
, then you can have instance variables, and an instance of the controller is created on each new request/session.
Upvotes: 7