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");