MyBatis编程步骤是怎么样的?

创建SqlSessionFactory–》SqlSessionFactoryBuilder –》建造成模式 –》Configuration通过创建的SqlSessionFactory对象来获取SqlSession对象 –》 Executor通过SqlSession对象执行数据库操作 –》API和Mapper接口代理对象 –》缓存 –》装饰者模式调用SqlSession中的commit方法来显示的提交事务 –》 数据源和事务模块 –》 JDBC和Managed调式SqlSession中的close方法来关闭会话

发表评论