# mybatis-batch **Repository Path**: xiwa/mybatis-batch ## Basic Information - **Project Name**: mybatis-batch - **Description**: mybatis batch operate extension for spring - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2017-07-11 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mybatis-batch mybatis batch operate extension for spring github:[https://github.com/xiwasong/mybatis-batch](https://github.com/xiwasong/mybatis-batch) oschina:[http://git.oschina.net/xiwa/mybatis-batch](http://git.oschina.net/xiwa/mybatis-batch) # use guide ##### 1.set BatchSessionFactoryBuilder ``` SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); bean.setSqlSessionFactoryBuilder(new BatchSessionFactoryBuilder()); ``` ##### 2.add mapping statement ``` insert into country (countryname, countrycode) values (#{item.name,jdbcType=VARCHAR},#{item.code,jdbcType=VARCHAR} ) ``` ##### 3.use SqlSessionTemplate ``` @Autowired private SqlSessionTemplate template; List countries=new ArrayList(); for(int i=0;i