参考下面文章 关于SqlSessionFactoryBuilder、SqlSessionFactory、SqlSession的生命周期和作用域_达不溜H的博客-CSDN博客_sqlsessionfactory生命周期