Home >Common Problem >what is mybatis

what is mybatis

不言
不言Original
2019-03-29 13:21:4433326browse

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!

Statement:
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
Previous article:What is Plesk?Next article:What is Plesk?