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