Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding basic Spring Framework and Total Flow

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.

like image 620
user1407297 Avatar asked Jul 06 '12 09:07

user1407297


2 Answers

  • 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:

like image 59
Anil Satija Avatar answered Oct 12 '22 13:10

Anil Satija


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

like image 23
POPOL Avatar answered Oct 12 '22 14:10

POPOL