SSM Framework Related knowledge

Source: Internet
Author: User
1.Spring MVC working principle:

1. Client sends request to Dispacherservlet (distributor)

2. Query handermapping by Dispacherservlet Controller, find the controller of processing request

3.Controller Call business logic processing, return Modelandview

4.DispacherSerclet Query view parser, find Modelandview specified view

5. The view is responsible for displaying the results to the client



2.Mybatis Advantages and disadvantages

Advantages: SQL is written in XML, facilitates unified management optimization, provides mapping labels, supports ORM field relationship mapping for objects and databases, and optimizes SQL.

Disadvantage: The SQL workload is large, mybatis portability is not good, does not support cascading.


3. Why use Spring.

1.spring can be well integrated with the major frameworks

2.spring managed object creation and destruction Factory mode through IOC container (design mode)

3. When using Hiberna and MyBatis, you can use spring's AOP to manage transactions without writing the code to commit the transaction every time


4. The difference between a programmatic transaction and a declarative transaction.

Programmatic transactions: The logic that requires you to add directly to the transaction in your code may require you to display a method in your code that calls BeginTransaction (), commit (), rollback (), and so on, such as in the execution of a method that requires transaction processing, You need to open the transaction at the beginning of the a method and close the transaction at the end of the method.

Declarative transactions: Add annotations to the perimeter of a method, or define them directly in a configuration file, when a method requires a transaction, in spring, a configuration file is intercepted before and after the A method, and the transaction is added.

The difference between the two, programmatic transaction intrusion is relatively strong, but the processing granularity is finer.


5. Talk about your understanding of the SSM framework

The SSM framework is the integration of spring MVC, spring and mybatis frameworks, a standard MVC pattern that divides the entire system into a presentation layer, a controller layer, a service layer, a DAO layer four layers

Use spring MVC to handle request forwarding and view management

Spring implements business object management, MyBatis as a persistent engine for data objects


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.