Home > Common Problem > what is mybatis

what is mybatis

不言
Release: 2020-09-10 13:15:53
Original
33329 people have browsed it

MyBatis is an excellent persistence layer framework based on Java. It encapsulates jdbc internally, so that developers only need to focus on the SQL statement itself, without spending energy on loading drivers, creating connections, and creating statements. Wait for the complicated process.

what is mybatis

MyBatis is an excellent persistence layer framework that supports customized SQL, stored procedures and advanced mapping.

Mybatis is an excellent persistence layer framework based on Java. It encapsulates jdbc internally, so that developers only need to focus on the SQL statement itself, without spending energy on loading drivers, creating connections, creating statements, etc. Complicated process.

mybatis configures various statements to be executed through xml or annotations, and maps the java object and the dynamic parameters of the sql in the statement to generate the final executed sql statement. Finally, the mybatis framework executes the sql and The result is mapped to a java object and returned.

The main design purpose of MyBatis is to make it more convenient for us to manage input and output data when executing SQL statements. Therefore, conveniently writing SQL and conveniently obtaining SQL execution results are the core competitiveness of MyBatis.

The functional architecture of Mybatis is divided into three layers:

1. API interface layer: interface API provided for external use. Developers use these local APIs to manipulate the database. Once the interface layer receives the call request, it will call the data processing layer to complete specific data processing.

2. Data processing layer: Responsible for specific SQL search, SQL parsing, SQL execution and execution result mapping processing, etc. Its main purpose is to complete a database operation according to the calling request.

3. Basic support layer: Responsible for the most basic functional support, including connection management, transaction management, configuration loading and cache processing. These are common things, and they are extracted as the most basic components. Provide the most basic support for the upper data processing layer.

The above is the detailed content of what is mybatis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template