itfsw/mybatis-generator-plugin

使用这个插件报错,问下这个问题怎么解决?

leizime opened this issue · 4 comments

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project lepai: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed: Cannot instantiate object of type com.itfsw.mybatis.generator.plugins.BatchInsertPlugin -> [Help 1]

itfsw commented

你没有引入插件啊,mybatis-generator-maven插件依赖应该是配置在插件配置里的

<!-- mybatis-generator 自动代码插件 -->
            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.5</version>
                <configuration>
                    <!-- 配置文件 -->
                    <configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
                    <!-- 允许移动和修改 -->
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
                </configuration>
                <dependencies>
                    <!-- jdbc 依赖 -->
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>5.1.40</version>
                    </dependency>
                    <dependency>
                        <groupId>com.itfsw</groupId>
                        <artifactId>mybatis-generator-plugin</artifactId>
                        <version>1.0.11</version>
                    </dependency>
                </dependencies>
            </plugin>

thank a lot

gradle 怎么引用