mybatis批量提交代码示例,mybatis提交示例,mybatis批量提交代
分享于 点击 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();
用户点评