From 52d864317b93cf469de475d071f4e1c1bfabd9c8 Mon Sep 17 00:00:00 2001 From: Owen Zou Date: Tue, 6 Jun 2017 19:40:25 +0800 Subject: [PATCH] fix Oracle or SQLServer plugin configuration issue --- pom.xml | 2 +- .../zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0f519bf3..5b98f2c5 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ copy-files-on-build - package + compile copy-resources diff --git a/src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java b/src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java index 5522fd7b..ed461bef 100644 --- a/src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java +++ b/src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java @@ -139,13 +139,13 @@ public void generate() throws Exception { // limit/offset插件 if (generatorConfig.isOffsetLimit()) { - PluginConfiguration pluginConfiguration = new PluginConfiguration(); if (DbType.MySQL.name().equals(selectedDatabaseConfig.getDbType()) || DbType.PostgreSQL.name().equals(selectedDatabaseConfig.getDbType())) { + PluginConfiguration pluginConfiguration = new PluginConfiguration(); pluginConfiguration.addProperty("type", "com.zzg.mybatis.generator.plugins.MySQLLimitPlugin"); pluginConfiguration.setConfigurationType("com.zzg.mybatis.generator.plugins.MySQLLimitPlugin"); + context.addPluginConfiguration(pluginConfiguration); } - context.addPluginConfiguration(pluginConfiguration); } context.setTargetRuntime("MyBatis3");