Spring Springmvc MyBatis (SSM) understanding

Source: Internet
Author: User
Tags java se

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.