一、下载克隆人人开源/renren-generator 然后删除文件夹里的.git ,然后复制到项目中,并加入父工程的pom里。
git clone https://gitee.com/renrenio/renren-generator.git
二、修改配置文件
1.applicaiton.yml 修改数据库连接地址以及所需要的生成代码的数据库,账户密码修改成自己的。
2.generator.properties

三、启动模块访问http://localhost/ 选中想要生成的代码,直接生成,会下载成压缩包。解压后,把需要main直接copy到项目中对应的模块当中。

复制进去后会发现有报错,把对应的依赖导入,以及一些工具类复制到对应的目录下。建议创建一个微服务公共的模块。用于存放一些公共的工具类及公共的依赖。工具类,可以从renren-fast/src/main/java/io/renren/common
里找到。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gulimall</artifactId>
<groupId>com.atguigu.gulimall</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gulimall-common</artifactId>
<description>每一个微服务公共的依赖,bean,工具类等</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- mybatis-plus-->
<dependency>
<groupId>com.baomidou

最低0.47元/天 解锁文章
1704

被折叠的 条评论
为什么被折叠?



