Reputation: 495
I am very confused about spring controllers, pls help me.
i want to know that how spring controller initate and how its constructor get into action,
as when i call a controller from one page, and then ask the same controller from another page it dosn't seems to create a new object of that controller rather than provide same reference of the controller object
Upvotes: 0
Views: 77
Reputation: 1741
Controllers are "application-scoped"; they are instantiated just once and then reused for all requests you associate them with. As such, it is important that they do not carry session-specific state.
You should refer to the documentation for more details on how controllers work and how to instantiate them.
Upvotes: 2