First, MyBatis framework introduction

MyBatis framework is the encapsulation of JDBC. The main purpose is to simplify the JDBC development process, achieve loose coupling management of transactions, and dynamically correspond entity classes to SQL commands. 2. Ibatis project originated from Apache and migrated to Google in 2010. 3. MyBatis framework is simple to use, and because it provides Chinese official documents, it can be mastered in about a day.

MyBatis download

MyBatis official website: github.com/mybatis/my….

Iii. MyBatis development process

3.1 Adding the MyBatis dependency JAR

3.2 Developing an entity mapping class

3.3 Developing an SQL mapping file

Create an SQL mapping file corresponding to the current table under SRC /main/resource to declare the SQL statement.

3.4 Develop MyBatis core configuration file

Create MyBatis-config.xml as the core configuration file under SRC /main/resources.

3.5 Develop the basic call flow of MyBatis