Mybatis process:
Mybatis of the steps:
1. Obtain a SqlSessionFactory
-
First of all configuration information is stored in the configuration, including: settingsElement, mapperElement
-
settingsElement
-
folders item
-
Each mapper under resolution resource
-
All xxxMapper file labels and parameters are stored in MappedStatement objects in
-
Then all the configuration information into configuration object tag
- Finally, because DefaultSqlSessionFactory implementation class is SqlSessionFactory
- So you end up with a SqlSessionFactory
in conclusion: