1 Understanding of Spring
(1) What is Spring?
Spring is the Java SE (Java Standard Version)/java EE (Java Enterprise Edition) Development application framework.
(2) The role of spring
(a) The core of spring is the container. Creates an object from a container configuration. The traditional creation object is: User User=new User (), which violates the low-coupling, high cohesion. Spring containers provide IOC DI, control inversion, and dependency injection to create objects. Compliant with low-coupling high cohesion.
2 understanding of the SPRINGMVC
(1) What is SPRINGMVC?
is a framework for the bonding of some of the previous products.
(2) composition
Dispatcherservlet, processor, processor mapping, view resolver, view
(3) Working principle
Analytical:
Dispatcherservlet: Front controller. The client sends a request that, after Dispatcherservlet, looks for the processor (handlermapping) and locates a specific controller before sending the request to the controller.
Handlermapping interface: Completes the mapping of the client request to the controller.
Controller: Complete the customer's request. Return the Modelandview to Dispatcherservlet.
Spring provides dispatcherservlet to process servlet.xml files. Look for the processor (handlermapping), and then call the processor. The controller is then found, the logical business is executed, and the view Modelandview is returned to Dispatcherservlet.
Viewresolver:spring provides the view resolver. Finds the View object in the Web and returns it to the client. Finish rendering.
3 Understanding of the MyBatis
MyBatis is an excellent persistence layer framework that supports the customization of SQL, stored procedures, and advanced mapping. MyBatis avoids almost all JDBC code and manually set parameters and extracts the result set. MyBatis uses simple XML or annotations to configure and map primitives, mapping interfaces and Java POJOs (Plain old Java Objects, ordinary Java objects) to records in a database.
Spring Springmvc MyBatis (SSM) understanding