欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

mybatis批量提交代码示例,mybatis提交示例,mybatis批量提交代

来源: javaer 分享于  点击 41114 次 点评:77

mybatis批量提交代码示例,mybatis提交示例,mybatis批量提交代


mybatis批量提交代码示例

SqlSession sqlSession = getSqlSessionFactory().openSession(ExecutorType.BATCH);AdminMapper adminMapper = sqlSession.getMapper(AdminMapper.class);for(APXIGBean apxig : apxigList) {adminMapper.insertAPXIG(Integer.parseInt(apxig.get Id()));}sqlSession.flushStatements();sqlSession.commit();sqlSession.close();
相关栏目:

用户点评