MyBatis批量更新返回受影响数

用MyBatis执行批量更新时,默认是返回-1、0、1

如果需要执行批量更新时返回受影响数,必须在连接字符串加上useAffectedRows=true

 

例如:jdbc:mysql://localhost:3306/searchengine?useAffectedRows=true

 

posted @ 2020-10-17 23:33  Clotho_Lee  阅读(4460)  评论(0编辑  收藏  举报