数据结构:
List list = new ArrayList<Map<String,String>>();
mapper:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.anji.excel.dao.ExcelDao">
<insert id="exceltosql" parameterType="java.util.List">
INSERT INTO config_business_mapdestdata( src_city_name, dest_city_name)
VALUES
<foreach collection="list" item="item" index="index" separator="," >
(#{item.src_city_name},#{item.dest_city_name})
</foreach>
</insert>
</mapper>