后端快速启动
clone后端源码
git clone https://gitee.com/bbc-se/api.git --branch 5.2.3
基础设施
1.请提前将mysql准备好
2.创建数据库
CREATE DATABASE `shoptnt`;
3.导入sql文件
将 源码目录/sql/database.sql 导入到 `shoptnt` 数据库
修改配置文件
修改 rest-api/src/main/resources/application.yml 配置文件中的数据库配置
数据库地址:spring.shardingsphere.datasource.ds0.url
数据库用户名:spring.shardingsphere.datasource.ds0.username
数据库密码:spring.shardingsphere.datasource.ds0.password
配置maven私服
推荐使用阿里私服,请参考"配置maven私服"
启动API
一、启动rest-api
rest-api/src/main/java/cn/shoptnt/RestApiApplication.java
二、验证swagger
swagger-ui: http://localhost:8080/swagger-ui/index.html
或者
Knife4j: http://localhost:8080/doc.html