Coder Social home page Coder Social logo

coderofsong / flowerpaas Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 5.0 159 KB

使用Maven构建,基于SpringBoot 2.1.0.RELEASE、SpringCloud Greenwich.RELEASE、SpringCloud Alibaba 2.1.0.RELEASE体系实现的微服务架构,采用OAuth2统一授权认证,支持Docker容器部署、限流、灰度发布等

Java 100.00%
maven springcloud springboot2-x nacos sentinel gateway zuul zipkin oauth2 mybatis

flowerpaas's Introduction

Spring Cloud整和项目 - FLOWERPaaS

Build StatusSinceVersionJavaMavenSpring BootSpring CloudSpring Cloud Alibaba

项目介绍

​ 网上有关SpringCloud的教程很多,相关的项目也很多,但很少有整合完整的好项目,即便有也是基于1.x的版本,在这个技术迭代更新发展速度很快的时代,这样的项目不利于实际开发和落地。因此flowerPaas诞生了,它是一套完整的微服务体系框架,几乎包含了微服务所有常用组件,为了让中小型公司解决当下技术瓶颈,快速将现有技术架构拆分改造为微服务体系架构,只需在本框架上进行相关业务开发即可,大大减少了微服务架构的入门门槛,为中小企业实现微服务落地节省了大量时间。

​ 本项目使用Maven构建,基于SpringBoot 2.1.0.RELEASE、SpringCloud Greenwich.RELEASE、SpringCloud Alibaba 2.1.0.RELEASE体系实现的微服务架构,采用OAuth2统一授权认证,支持Docker容器部署、限流、灰度发布等。


核心组件介绍

- 服务注册、发现、配置中心: nacos
- 服务监控:spring boot admin
- 消息总线:spring cloud bus -> amqp
- 负载均衡:feign / ribbon
- 熔断降级:spring cloud alibaba sentinel
- 路由网关:gateway / zuul
- 链路追踪:spring cloud sletuh -> zipkin
- 安全认证:spring security -> oauth2
- ORM框架:mybatis
- 数据源监控:druid
- api文档输出:swagger2
- 分布式锁:redis(待实现)
- 消息队列:rabbitmq
- 分布式事物:3PC+TCC(待实现)

平台目录结构说明

├── flowerPaaS·······················父项目,公共依赖
│   ├── DB···························初始化DB 
│   │
│   ├── flower-admin·················微服务监控中心
│   │
│   ├── flower-common················微服务公共包
│   │   ├── flower-common-base·······公共基础包
│   │   ├── flower-common-config·····公共配置包
│   │   ├── flower-common-core·······微服务核心依赖包
│   │   └── flower-common-utils······公共工具包
│   │
│   ├── flower-gateway···············微服务网关中心
│   │
│   ├── flower-provider-client·······服务消费者
│   │   └── flower-urm-client········用户管理服务消费者
│   │
│   ├── flower-provider-service······服务提供方
│   │   ├── flower-auth-service······鉴权服务提供方
│   │   └── flower-urm-service·······用户管理服务提供方
│   │
│   └── flower-zipkin················微服务日志采集中心

开发环境及工具

- MacOS / Windows
- JDK 1.8
- IntelliJ IDEA
- maven

相关中间件及版本

名称 版本 链接
Alibaba nacos v1.1.4 https://nacos.io/zh-cn/
Alibaba sentinel-dashboard v1.7.0 https://github.com/alibaba/Sentinel/releases/tag/1.7.0
MySql v8.0.13 https://www.mysql.com
Redis v5.0.2 https://redis.io
RabbitMQ v3.7.9 https://www.rabbitmq.com

项目架构图

(架构图)


数据库表结构及说明

(表ER图)

(表结构)


项目运行

  1. 下载项目,并且导入到IDEA中(步骤略)

  2. 正常启动nacos v1.1.4RabbitMQ v3.7.9MySql v8.0.13Redis v5.0.2这4个必备中间件服务和sentinel-dashboard v1.7.0 熔断降级,流量控制服务

    # nacos启动
    sh nacos/bin/startup.sh -m standalone
    
    # RabbitMQ启动
    systemctl start rabbitmq-server.service
    
    # MySQL Redis 启动略
    
    # 熔断降级,流量控制服务启动
    java -Dserver.port=8880 -Dcsp.sentinel.dashboard.server=localhost:8880 -Dproject.name=flower-sentinel-service -Dsentinel.dashboard.auth.username=admin -Dsentinel.dashboard.auth.password=admin -jar sentinel-dashboard.jar > /Users/songdeling/Desktop/test/logs/flower-sentinel.log.out 2>&1 &
  3. 创建2个数据库分别为 flower_basics_dev、flower_zipkin_dev 并分别执行根目录 BD 中的 flower_basics.sql、flower_zipkin.sql 文件,创建整个项目必要的表

  4. 修改项目的 resources/application.yml 配置文件中的datasource druid数据库连接信息

  5. 修改项目的 resources/log4j2.yml 配置文件中的 -log.path value 日志输出路径

  6. 启动服务,启动顺序如下

    flower-gateway
    flower-admin
    flower-zipkin
    flower-urm-service
    flower-auth-service
    

效果展示

服务注册/发现、配置中心


flowerPaaS功能、计划及排期

功能/计划 主要开发者 状态 排期
配置管理 宋德凌 开发中 1.1.0
全链路压测 - 计划中 1.2.0
Docker发布 - 计划中 1.3.0
服务调用实时监控 宋德凌、王雄昌 计划中 1.4.0
分布式事物 宋德凌、王雄昌 计划中 1.5.0
灰度发布 宋德凌、王雄昌 计划中 1.6.0

问题反馈

​ 相关交流群在项目经过一次全链路压测后发布,在使用时如果发现问题,欢迎反馈至 [email protected]

flowerpaas's People

Contributors

coderofsong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.