The most in-depth interpretation of the MyBatis source code in the entire network, the first-line architect summarizes, GitHub is hot

Preface

MyBatis is an excellent persistence layer ORM framework. It encapsulates the process of jdbc's database operation, so that developers only need to pay attention to SQL itself, instead of spending energy on processing such as registering drivers, creating connections, creating statements, and manually setting parameters , Result set retrieval and other jdbc complicated process code.

If you are not familiar with the use of MyBatis, please refer to the official MyBatis document first, which is of great benefit to understanding its architecture design and source code analysis.

Recently, a MyBatis source code interpretation document has become popular on GitHub. It is regarded as the most in-depth MyBatis source code interpretation in the entire network. It is summarized by a certain line of architects. Ten years of development experience, I believe it is here. The information is ready, ready to receive benefits!

After you like + follow, click here to get it for free!

Build MyBatis source code environment

  • Introduction to MyBatis3
  • Environmental preparation
  • Get MyBatis source code
  • Import MyBatis source code to IDE
  • Introduction to HSQLDB database

 

Detailed JDBC specification

  • Introduction to JDBC API
  • Classes and interfaces in JDBC API
  • Connection details
  • Statement detailed
  • Detailed ResultSet
  • DatabaseMetaData 详解
  • JDBC transaction

MyBatis common tools

  • Use SQL to generate statements
  • Use ScriptRunner to execute scripts
  • Use SqlRunner to operate the database
  • MetaObject detailed
  • MetaClass detailed
  • Detailed ObjectFactory
  • Detailed ProxyFactory

Introduction to the core components of MyBatis

  • Use MyBatis to operate the database
  • MyBatis core components
  • Configuration details
  • Executor detailed
  • Detailed MappedStatement
  • Detailed Explanation of StatementHandler
  • TypeHandler detailed
  • Detailed ParameterHandler
  • Detailed ResultSetHandler

SqlSession creation process

  • Parse XML files in XPath mode
  • Configuration instance creation process
  • SqlSession instance creation process

 

SqlSession executes the Mapper process

  • Registration process of Mapper interface
  • MappedStatement registration process
  • Detailed description of the Mapper method call process
  • SqlSession executes the Mapper process

MyBatis cache

  • Use of MyBatis cache
  • MyBatis cache implementation class
  • MyBatis first level cache implementation principle
  • The realization principle of MyBatis secondary cache
  • MyBatis uses Redis cache

MyBatis log implementation

Java logging system

MyBatis log implementation

Principles of Dynamic SQL Implementation

  • Use of dynamic SQL
  • Detailed explanation of SqlSource and BoundSql
  • LanguageDriver detailed
  • SqINode detailed
  • Dynamic SQL parsing process
  • Analyze the difference between #{} and ${} from the perspective of source code

The principle and application of MyBatis plug-in

  • MyBatis plug-in implementation principle
  • Customize a paging plugin
  • Custom slow SQL statistics plugin

MyBatis cascade mapping and lazy loading

  • Detailed explanation of MyBatis cascade mapping
  • MyBatis lazy loading mechanism
  • The realization principle of MyBatis cascade mapping
  • Implementation principle of lazy loading

MyBatis Spring source code

  • MyBatis and Spring integration case
  • The realization principle of MyBatis Spring

to sum up

If you want to enter a big factory, you must have the ability to match. Knowing how to use does not mean proficiency. Only through continuous learning can you get a high salary and become a technical expert.

The above MyBatis source code interpretation document, friends who need it, please like + follow; click here to get it for free!

Guess you like

Origin blog.csdn.net/a159357445566/article/details/111921388