mybatis注解方式批量插入数据
2024-09-02 03:30:31
@Insert("<script>" +
"INSERT INTO cms_portal_menu(name,service_type,index_code) VALUES" +
"<foreach collection=\"list\" item=\"item1\" index=\"index\" separator=\",\">" +
"(#{item1.name},#{item1.serviceType},#{item1.indexCode})" +
"</foreach>" +
"</script>")
int batchInsert(@Param("list")List<Menu> menus);
注意别漏掉script标签
最新文章
- Delphi XE7中各种字符串与字符类型的内存结构
- 16101301(MaterialLOD QualitySwitch)
- 使用Android Studio进行单元测试
- Maximum Gap
- AES加密和Base64混合加密
- get方法
- poj 1573 Robot Motion_模拟
- LeetCode Day5——House Robber
- 第7章 一个java源文件中只能有一个public类
- 关于anaconda中jupyter notebook错误
- 基于 Confluence 6 数据中心在你的 Atlassian 应用中配置 SAML 授权
- Kubernetes-Host网络模式应用
- Excel设置excel打印每页都有表头标题
- 2018-2019 2 20165203 《网络对抗技术》 Exp4 恶意代码分析
- java File.separator 简介
- abap method中的异常处理
- SSL&;HTTPS简单介绍
- 第06章:MongoDB-CRUD操作--集合
- 线程、线程ID获取
- HttpServletResponse对象(一)
热门文章
- @property与@synthesize的差别
- The password supplied with the username Domain\UserName was not correct. Verify that it was entered correctly and try again
- 怎样为你的CSDN博客增加百度统计
- Internet上的WWW服务与HTTP协议(非常非常不错的文档,推荐订阅)
- Java代码通过API操作HBase的最佳实践
- notepad++添加插件管理器
- 谈谈MySQL的黑暗语法
- mysql获得60天前unix时间示例
- testbench的设计 文件读取和写入操作 源代码
- Android 相关的资源