Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
fp2952 committed Aug 4, 2018
1 parent d0a5bce commit b2dfeb3
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 21 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ phone: 13100000000 verifyCode: 1000
* [db-mybatis-pagehelper](https://github.com/fp2952/spring-cloud-base/tree/master/db-mybatis-pagehelper):Mybatis通用Mapper、分页模块
* [docker-compose](https://github.com/fp2952/spring-cloud-base/tree/master/docker-compose):docker-compose编排
* [main-data](https://github.com/fp2952/spring-cloud-base/tree/master/main-data):基础数据模块
* [mc-service](https://github.com/fp2952/spring-cloud-base/tree/master/mc-service):消息组件
* [visul/monitor](https://github.com/fp2952/spring-cloud-base/tree/master/visul/monitor/):admin监控服务
* [visul/zipkin-db](https://github.com/fp2952/spring-cloud-base/tree/master/visul/zipkin-db):zipkin链路追踪服务
* [web-app](https://github.com/fp2952/spring-cloud-base/tree/master/web-app):前端vue项目

### 项目结构
Expand Down Expand Up @@ -44,8 +47,13 @@ phone: 13100000000 verifyCode: 1000
│ ├─main-data--------------基础数据模块
│ │ ├─main-data-api----------------基础数据公共模块
│ │ ├─main-data-client----------------基础数据模块客户端
│ │ ─main-data-provider----------------基础数据模块服务端
│ │ ─main-data-provider----------------基础数据模块服务端
│ │
│ ├─visul---------------监控
│ │ ├─monitor----------------admin监控
│ │ └─zipkin-db----------------zipkin链路追踪
│ ├─mc-service---------------消息服务
│ │
│ └─web-app--------------vue前端应用
```
Expand All @@ -65,11 +73,16 @@ phone: 13100000000 verifyCode: 1000

## Quick Start
### 依赖环境
JDK8、 Maven、 Mysql、 Redis、Consul(暂不支持0.7.3以上)、 Nodejs、 Docker(可选)、 docker-compose(可选)
JDK8、 Maven、 Mysql、 Redis、Consul、 Rabbitmq、Nodejs、 Docker(可选)、 docker-compose(可选)
### 运行步骤
1. Mysql导入数据: 运行main-data/schema.sql 文件
2. 更改 application配置文件(服务授权中心、网关负载中心、基础数据模块),jdbcUrl、 consul、 redis、 key-uri(服务授权中心公钥,资源服务器需配置)
3. 依此启动 mysql、 redis、 consul、 auth-center/auth-center-provider/AuthCenterProviderApplication.main(服务授权中心)、 api-gateway/ApiGatewayApplication.main()(网关负载中心)、 main-data/main-data-provider/MainDataApplication.main()(基础数据模块)、 web-app(前端vue项目)
1. git clone https://github.com/fp2952/spring-cloud-base.git
1. Mysql导入数据: 运行main-data/schema.sql 文件;
2. 更改配置文件,此项目默认本地配置,更改 config-git/src/main/resource/config 下的配置文件,主要需修改数据库链接、 Redis链接、 Rabbitmq链接等;
3. 启动 Consul (下载地址: https://www.consul.io/downloads.html), window下载解压完为exe可执行文件, 进入其文件夹下 cmd -> consul agent -dev 启动,此时可访问 http://localhost:8500 查看Consul Ui页面;
4. 启动redis、 Rabbitmq;
5. 依此启动 config-git/ConfigServerApplication.main(配置中心)、auth-center/auth-center-provider/AuthCenterProviderApplication.main(服务授权中心)、 api-gateway/ApiGatewayApplication.main()(网关负载中心)、 main-data/main-data-provider/MainDataApplication.main()(基础数据模块),注意启动顺序,配置中心必须最先启动,网关和基础数据模块依赖授权模块的 jwt/key-uri point;启动后可在Consul图形界面上即可看到已注册的服务;
6. 前端Vue项目需node环境(https://nodejs.org/en/download/), cd web-app、安装依赖 npm install、 启动项目 npm dev run , 需更改后端接口地址, /static/config.js/window.serverconf/development


### 通过 docker-compose 快速启动
1. 需要 docker-compose 环境,windows 可安装 DockerToolbox。
Expand Down Expand Up @@ -155,4 +168,11 @@ docker-compose up [-d]

* 模块管理:
![avatar](http://112.74.60.248:8080/image/module.png)



## 更新日志
* 2018-06 spring security登陆验证扩展 手机验证码,二维码扫码登陆、 引入i18n国际化、 集成git配置中心、admin监控、 链路追踪、Springcloud 升级为Edgware,Consul升级为最新1.2
* 2018-05 完成基础数据模块开发、 docker容器编排
* 2018-05 授权中心整和Jwt、 SpringSecurity,使用 OAuth2 授权
* 2018-03 init, 完成公共模块设计、 SpringBoot starter开发
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
</div>
</div>
</div>
<div style="text-align: center">
<a href="http://www.miitbeian.gov.cn/" target="_blank">粤ICP备18027057号</a>
</div>
</body>
<script src="webjars/jquery/3.2.1/jquery.min.js" ></script>
<script src="webjars/Semantic-UI/2.2.10/semantic.min.js" ></script>
Expand Down
5 changes: 4 additions & 1 deletion config-git/src/main/resources/config/api-gateway-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ security:
jwt:
key-uri: http://${AUTH_CENTER_HOST:localhost}:${AUTH_CENTER_PORT:18001}/auth/oauth/token_key
id: ${spring.application.name}
serviceId: ${spring.application.name}
serviceId: ${spring.application.name}

logging:
file: logs/api-gateway.log
5 changes: 4 additions & 1 deletion config-git/src/main/resources/config/monitor-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ receiver:
mobiles:
- 17034642119
emails: |
[email protected]
[email protected]
logging:
file: logs/monitor.log
2 changes: 1 addition & 1 deletion config-git/src/main/resources/config/zipkin-db-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ zipkin:
type: mysql

logging:
file: logs/localhost.log
file: logs/zipkin-db.log
22 changes: 17 additions & 5 deletions web-app/src/assets/fonts/iconfont.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified web-app/src/assets/fonts/iconfont.eot
Binary file not shown.
Loading

0 comments on commit b2dfeb3

Please sign in to comment.