Skip to content

Latest commit

 

History

History
executable file
·
55 lines (48 loc) · 1.33 KB

README.md

File metadata and controls

executable file
·
55 lines (48 loc) · 1.33 KB

MyBatis Generator Plugins

Set of plugins for the mybatis-generator.

RenameExampleMethodPlugin

e.g.:

<plugin type="com.jsmartx.mybatis.plugins.RenameExampleMethodPlugin">
  <property name="searchString" value="Example"/>
  <property name="replaceString" value="Query"/>
</plugin>

Usage

# Package to jar file
mvn clean package

# Copy jar to your project
cp target/mybatis-generator-plugins.jar YOUR_PROJECT/lib/

Maven config:

<build>
  <plugins>
    <plugin>
      <groupId>org.mybatis.generator</groupId>
      <artifactId>mybatis-generator-maven-plugin</artifactId>
      <version>1.3.7</version>
      <configuration>
        <configurationFile>lib/generatorConfig.xml</configurationFile>
        <overwrite>true</overwrite>
      </configuration>
      <dependencies>
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>5.1.34</version>
        </dependency>
        <dependency>
          <groupId>com.jsmartx.mybatis</groupId>
          <artifactId>mybatis-generator-plugins</artifactId>
          <version>1.0.0</version>
          <scope>system</scope>
          <systemPath>${basedir}/lib/mybatis-generator-plugins.jar</systemPath>
        </dependency>
      </dependencies>
    </plugin>
  </plugins>
</build>