Coder Social home page Coder Social logo

haoht / mybatis-generator-plugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from misterchangray/mybatis-generator-plugins

0.0 1.0 0.0 26 KB

扩展mybatis-generator插件;高效率分页查询,自动添加swagger2注解到实体类

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%

mybatis-generator-plugins's Introduction

myBatisGeneratorPlugins

一些mybatis-generator扩展插件集合

已实现功能

  • 自动添加swagger2注解到实体类

maven引用

 <dependency>
    <groupId>com.github.misterchangray.mybatis.generator.plugins</groupId>
    <artifactId>myBatisGeneratorPlugins</artifactId>
    <version>1.0</version>
  </dependency>

怎么使用 how to use

增加依赖到你的pom.xml文件 mybatis 节点下,如下:
add dependency to your pom.xml on mybatis node. like:

<!-- maven  -->
<build>
    <finalName>common-core</finalName>
    <!--  ...  -->
    <plugins>
      <!--mybatis 逆向工程插件-->
      <plugin>
        <groupId>org.mybatis.generator</groupId>
        <artifactId>mybatis-generator-maven-plugin</artifactId>
        <version>1.3.5</version>
        <configuration>
          <verbose>true</verbose>
          <overwrite>true</overwrite>
        </configuration>
        <dependencies>
          <!--  us plugin  -->
          <dependency>
            <groupId>com.github.misterchangray.mybatis.generator.plugins</groupId>
            <artifactId>myBatisGeneratorPlugins</artifactId>
            <version>1.0</version>
          </dependency>
  
        </dependencies>
      </plugin>
    </plugins>
  </build>

1. 自动添加swagger2注解到实体类

generatorConfig.xml中增加插件配置

        <!-- 自动为entity生成swagger2文档-->
        <plugin type="mybatis.generator.plugins.GeneratorSwagger2Doc">
          <property name="apiModelAnnotationPackage" value="io.swagger.annotations.ApiModel" />
          <property name="apiModelPropertyAnnotationPackage" value="io.swagger.annotations.ApiModelProperty" />
        </plugin>

runtime environment

  • OS Microsoft Windows 10 Pro
  • Java 8
  • springMVC 4.3
  • Mybitis 3.4
  • Mysql 5.5.50
  • Restful interface
  • Maven 3.5.3
  • Git 2.14.1
  • Swagger 2.6.1

mybatis-generator-plugins's People

Contributors

misterchangray avatar

Watchers

haoht avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.