適合用戶說明
此項目僅爲演示目的, 包含的功能很少, 包含的太多的話, 看起來就會太困難. 因此儘量少可是必須的功能.
適合小公司從頭搭建項目.
概要
- 此項目是一個基於Spring Cloud 2020版本的快速腳手架, 使用了微服務和網關, 用於中小公司搭建項目.
- 使用了Spring Cloud Gateway, Mybatis, Zookeeper, Freemarker, Redis, Kafka, JWT等技術.
涵蓋功能:
- 使用Zookeeper做爲註冊中心
- 數據庫操做MyBatis
- @自定義配置中心: Zookeeper
- 緩存操做 Redis
- 隊列操做 Kafka: Producer, Consumer
- @@@ MyBatis配置存到Zookeeper, 支持動態修改數據庫
- @用戶登陸受權: 使用JWT, Cookie
- 模版渲染: Freemarker支持, 適合作SEO.
- @@@ 集成網關: 限流 熔斷 降級等網關特性
截圖
此項目爲了演示, 集成了幾個基於jquery + bootstrap的前端頁面.
示意以下:
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
模塊說明
cavedemo-root: 依賴管理
ms-fundmain
ms-fundmain-base: 基礎服務 - 原型模塊
ms-fundmain-service: 基礎服務 - 微服務實現
mq-consumers 消息消費
ms-gateway 網關
web 用戶WEB
用到的相關工具
代碼生成: Free Mybatis Plugin (Idea) 或 Mybatis Generate (Maven插件)
Zookeeper本地GUI工具: PrettyZoo https://zhuanlan.zhihu.com/p/353163620
Redis 桌面: https://github.com/qishibo/AnotherRedisDesktopManager/releases
Logo網站: https://www.designevo.com/cn/logo-maker/
代碼位置
github地址: https://github.com/cnscud/cavedemo
請閱讀項目的readme.
根據本身須要複製修改.
依賴項目
依賴本身整理的一個快速工具箱, 已經發布到maven中心倉庫
github地址: https://github.com/cnscud/xpower
此項目還有不少須要完善之處, 也能夠本身替換爲本身的基礎庫.