新版代码生成器 - xinwu-yang/cube-java GitHub Wiki

新版代码生成器

基于CodeGenerator项目的Maven插件, 只需要简单的配置即可生成大量的代码.

  • 暂时只支持魔方内置注解,spring内置注解(暂时不支持hibernate注解)
配置内容:
  1. 在Maven的settings.xml配置公司的私服
<mirror>
  <id>nexus</id>
  <name>nexus</name> 
  <url>http://25.30.9.199:8081/content/groups/public/</url>
  <mirrorOf>*</mirrorOf>
</mirror>
以maven插件方式运行(只可生成项目内实体类代码):
  1. 在项目中引入
<plugin>
    <groupId>com.tievd</groupId>
    <artifactId>cube-generation-plugin</artifactId>
    <version>1.0.0</version>
    <configuration>
        <!-- 这里填写实体类路径 -->
        <beanPath>com.tievd.cube.starter.entity.Linkman</beanPath>
        <!-- 这里配置输出路径 -->
        <outPath>/Users/cube/outPath/</outPath>
    </configuration>
</plugin>
  1. Mojo
  • cube-generation:code 生成代码
独立运行(可生成指定路径实体类代码):
  1. java -jar cube-generation-plugin-1.0.0.jar -beanPath=com.tievd.cube.starter.entity.Linkman -outPath=/Users/cube/outPath/

    -beanPath: 实体类路径

    -outPath: 生成代码输出路径

⚠️ **GitHub.com Fallback** ⚠️