![](https://img-blog.csdnimg.cn/9b6fcc904c7f4b85b17146b573869ba1.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
MyBatis
MyBatis本是apache的一个开源项目iBatis,2010年这个项目由apache software foundation迁移到了google code,并且改名为MyBatis。2013年11月迁移到Github。iBATIS一词来源于“internet”和“abatis”的组合。
编程课堂
帮助别人,快乐自己,可能困扰你的技术难点,曾经我也深陷其中,希望在这里你可以找到答案
展开
-
MyBatis 批量将List集合数据插入到数据库
MySQL插入多条记录sqlinsert into users (age, `name`) values (20, '张三'), (21, '李四'), (22, '王五')1、Mapper层@Mapperpublic interface UserMapper extends BaseMapper<User> { int addBatch(@Param("users") List<User> users);}2、Mapper.xml<insert id原创 2021-04-26 18:15:00 · 1255 阅读 · 0 评论 -
MyBatis 使用数组作为参数
主要代码:1、接口List<Station> getList(@Param("typeIds") Integer[] typeIds);2、xml文件<select id="getList" resultType="Station"> select id, `name`, lon, lat, city, county, town, is_native isNative, type, `describe` from stations where is_原创 2020-10-24 17:52:28 · 1018 阅读 · 0 评论