From f1d1978ad9a32eba923a708b5381efc2c8a0584b Mon Sep 17 00:00:00 2001 From: hewei Date: Mon, 25 Jun 2018 17:49:24 +0800 Subject: [PATCH] =?UTF-8?q?bugfix[issues#35]:Mysql=E6=96=B0=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/itfsw/mybatis/generator/plugins/BatchInsertPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/itfsw/mybatis/generator/plugins/BatchInsertPlugin.java b/src/main/java/com/itfsw/mybatis/generator/plugins/BatchInsertPlugin.java index c0a1ce0..a68188e 100644 --- a/src/main/java/com/itfsw/mybatis/generator/plugins/BatchInsertPlugin.java +++ b/src/main/java/com/itfsw/mybatis/generator/plugins/BatchInsertPlugin.java @@ -52,7 +52,8 @@ public class BatchInsertPlugin extends BasePlugin { // 插件使用前提是数据库为MySQL或者SQLserver,因为返回主键使用了JDBC的getGenereatedKeys方法获取主键 if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false && "com.microsoft.jdbc.sqlserver.SQLServer".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false - && "com.microsoft.sqlserver.jdbc.SQLServerDriver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false) { + && "com.microsoft.sqlserver.jdbc.SQLServerDriver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false + && "com.mysql.cj.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false) { warnings.add("itfsw:插件" + this.getClass().getTypeName() + "插件使用前提是数据库为MySQL或者SQLserver,因为返回主键使用了JDBC的getGenereatedKeys方法获取主键!"); return false; }