1.配置renren-generator
配置application.yml
- 数据源
配置generator.properties
mainPath=com.atguigu
#包名
package=com.atguigu.gulimall
moduleName=product
#作者
author=zou
#Email
email=zou@163.com
#表前缀(类名不会包含表前缀)
tablePrefix=pms_
2.启动、访问,生成代码
下载renren.zip,并解压
3.整合项目
将文件夹main,拷贝到项目\src下,并删除目录:项目\src\main\resources\src
添加application.yml
server:
port: 11000
spring:
datasource:
username: root
password: root
url: jdbc:mysql://192.168.77.130:3306/gulimall_pms?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
#设置实体类的自增主键
global-config:
db-config:
id-type: auto
product项目引入common
<dependency>
<groupId>com.atguigu.gulimall</groupId>
<artifactId>gulimall-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>