Skip to content

MyBatis Generator Plugin. Generate remarks for classes and fields, and also generate batch insert sql.

License

Notifications You must be signed in to change notification settings

cuteason/mygenerator-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mygenerator-plugin

MyBatis Generator Plugin. 自动生成类和字段的注释,同时生成批量插入的sql

how to run with maven

  1. mvn install
  2. in your pom.xml, add dependency of the plugin.
<build>
    <plugins>
        <plugin>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-maven-plugin</artifactId>
            <version>1.3.5</version>
            <dependencies>
                <dependency>
                    <groupId>com.hollyshi</groupId>
                    <artifactId>mygenerator-plugin</artifactId>
                    <version>1.0.0-SNAPSHOT</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>
  1. in your generatorConfig.xml, add the plugin.
<plugin type="com.hollyshi.mybatis.generator.MyGeneratorPlugin">
    <property name="modelClassAuthor" value="hollyshi"/>
</plugin>

<commentGenerator>
    <!-- we do not want those comments generated by the plugin itself -->
    <property name="suppressAllComments" value="true"/>
    <property name="suppressDate" value="true"/>
</commentGenerator>

<jdbcConnection driverClass="...">
    <!-- use information schema so we can get the table remarks -->
    <property name="useInformationSchema" value="true"/>
</jdbcConnection>
  1. run mvn mybatis-generator:generate
  2. done.

About

MyBatis Generator Plugin. Generate remarks for classes and fields, and also generate batch insert sql.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages