Automatically configure class imports

1. Import the mybatis-spring-boot-starter JAR package

Mybatis -spring-boot-autoconfigure JAR package

Meta-inf \spring.factories

4, MybatisAutoConfiguration automatic configuration class

SqlsessionFactory A compiled memory image of a single database mapping SqlsessionTemplateCopy the code

The mapper class scanning

MapperScannerRegistrarNotFoundConfiguration

AutoConfiguredMapperScannerRegistrar|MapperScanner

MapperScannerConfigure

Scan mapper interfaces to register with containers

The mapper class generation

ClassPathMapperScanner.processBeanDefinitions

Beanclass is replaced with mapPerFactoryBean.class

MapperFactoryBean#getObject

MapperProxy object

The mapper class to perform

MapperProxy#invoke

MapperMethod#execute

Call the SQLSession operation based on the database operation type

Return execution result