The concept of SPRINGMVC
is a web-layer framework, essentially a huge servlet;
All requests are sent to Springmvc, the servlet: @WebServlet ("/");
All the corresponding are SPRINGMVC issued;
SPRINGMVC distribute the request to the corresponding Java class;
SPRINGMVC Container: Manages many instances of a Java class, distributing the requested object;
Web: A problem for handling jumps and data transfer;
Springmvc How to use
First, you need to introduce the jar package required by SPRINGMVC: http://repo.spring.io/release/org/springframework/spring/
Configure SPRINGMVC This servlet, which is configured as a servlet in Web. xml;
SPRINGMVC is a servlet that is used to receive *.action requests;
Configure the SPRINGMVC core configuration file;
SPRINGMVC's core configuration file is essentially a spring configuration file, and an instance of the bean needs to be found;
Tell Dispatcherservlet where to use the core configuration file;
What the core configuration file needs to configure:
Request Line:
SPRINGMVC itself is a spring concept: managing the relationship between beans and beans;
Springmvc this servlet needs to find common Java classes (beans)
Response Line:
View counterpart: Springmvc gives a logical view--needs to be converted to a physical view
There are a number of responses returned, looking for physical views (like key-value pairs) in a logical view
View Resolver:
The class that realizes the control layer of SPRINGMVC management: controller;
is the normal Java class for SPRINGMVC distribution requests
With packet scanning, the Hellocontroller class becomes a bean instance that SPRINGMVC can use directly
With view parsing, the return value result is parsed as:/result.jsp;
PS: Due to the limited ability of the author, such as wrong, please understand;
SSM Application (iv)--SPRINGMVC Getting Started