1.Configuration
![img_411f8d02341f256cf39426b0e4a95199.png](https://yqfile.alicdn.com/img_411f8d02341f256cf39426b0e4a95199.png?x-oss-process=image/resize,w_1400/format,webp)
Configuration
2.SessionFactory(重点)
![img_5c8f37c4fad0bb393cc51915855d82a8.png](https://yqfile.alicdn.com/img_5c8f37c4fad0bb393cc51915855d82a8.png?x-oss-process=image/resize,w_1400/format,webp)
SessionFactory
Utils工具类:只在类被定义的时候创建sessionFactory,保证sessionFactory只被创建一次
![img_106b8ffe008bf1446e93909cb4c6c8a4.png](https://yqfile.alicdn.com/img_106b8ffe008bf1446e93909cb4c6c8a4.png?x-oss-process=image/resize,w_1400/format,webp)
Utils工具类
3.Session(重点)
![img_0a2ad245b0dfd9c2f8d5305f0491b9fa.png](https://yqfile.alicdn.com/img_0a2ad245b0dfd9c2f8d5305f0491b9fa.png?x-oss-process=image/resize,w_1400/format,webp)
Session
4.Transaction
![img_4d26a11d7a17b48b3b24f41a5b1fc6c2.png](https://yqfile.alicdn.com/img_4d26a11d7a17b48b3b24f41a5b1fc6c2.png?x-oss-process=image/resize,w_1400/format,webp)
Transaction
Utils工具类:只在类被定义的时候创建sessionFactory,保证sessionFactory只被创建一次