【开源项目】一篇文章搞掂:Pig微服务框架

1、项目开发环境和运行步骤

1.1、项目开发环境

Idea:2018.1.6

Maven:3.5.3

JDK:1.8.0_172

MySQL:5.7.19(之前安装8.0.11会运行失败)

Redis:3.2.100

RabbitMQ:3.7.7

1.2、获取代码

后端地址:https://gitee.com/log4j/pig.git

配置文件地址:https://gitee.com/cqzqxq_lxh/pig-config.git

前端地址:https://gitee.com/log4j/pig-ui.git

把3个项目都FORK到自己的码云再GIT,或使用Idea直接把3个项目Git到本地

1.3、运行步骤

  后端:

  1、创建一个数据库并运行数据库脚本:doc/pig.sql

2、运行注册中心:

运行PigEurekaApplication(pig-eureka)

3、运行配置中心:

修改pig-config的spring.cloud.config.servier.git.uri为自己的配置文件GIT地址

修改GIT中application-dev.yml、pig-auth-dev.yml、pig-upms-service-dev.yml的mysql、redis、rabbitmq(安装后默认127.0.0.1/5672/guest/guest)的信息

删掉logback-spring.xml文件,因为写日志写在C盘,没有权限

运行PigConfigApplication(pig-config)

4、运行验证服务器:

运行PigAuthServerApplication(pig-auth)

5、运行网关:

PigGatewayApplication(pig-gateway)

6、运行通用权限系统:

PigAdminApplication(pig-upms-service)

 前端:

1、安装node.js

2、在idea中运行npm install --registry=https://registry.npm.taobao.org

3、在idea中运行npm run dev

4、浏览器访问 http://localhost:8000

未完待续

原文地址:https://www.cnblogs.com/LiveYourLife/p/9560455.html