I am new to the Spring Framework. Please guide me regarding basic understanding of Spring. I know Java and JSF, but I don't know anything about Struts or other frameworks. I have searched the Internet and was able to download a PDF, but I don't understand the Spring flow like I understand JSF flow. Please provide me with links for a simple way to understand Spring's flow.
- Transition 1 – User sends request to server by submitting form / by
clicking hyperlink etc. Request is initially given to WEB.XML.
- Transition 2 – WEB.XML routes request to DispatcherServlet by looking
at tag.
- Transition 3 – Inside DispatcherServlet,
First ‘HandlerMapping’ handed over request to suitable ‘Controller’.
- Transition 4 – Controller maps request to proper Model class. All
BUSINESS LOGIC is done inside Model class.
- Transition 5 – If database
operation is needed then Model class will route request to suitable
DAO. All database operations should be carried out in DAO.
- Transition6 – If needed then attach attributes into request/session/application
scope and return back to Model.
- Transition 7 – If needed then attach
attributes into request/session/application scope and return back to
Controller.
- Transition 8 – Controller simply returns it to any View
(JSP/HTML etc).
- Transition 9 – JSP/Html is viewed back to user.
Spring MVC Application Flow:
I'm new to Spring Framework too.
Up to now, the document below is the most basic one. I'm reading it as well, hope it could help you.
Introduction to Spring Framework