Giter VIP home page Giter VIP logo

fafalong / bxycloud Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 8.0 3.85 MB

基于SpringCloud(Hoxton.SR7) + SpringBoot(2.2.9.RELEASE) 的SaaS型微服务快速开发平台,具有统一授权、认证后台管理系统,其中包含具备用户管理、资源权限管理、网关API支持白名单、分布式事务等多个模块,支持多业务系统并行开发,可以作为后端服务的开发脚手架。代码简洁,架构清晰,适合学习和直接项目中使用。核心技术采用Nacos、Fegin、Ribbon、Gateway、Hystrix、JWT Token、Mybatis、SpringBoot、Redis、RibbitMQ等主要框架和中间件。

License: Apache License 2.0

Java 98.98% Lua 0.03% Dockerfile 0.11% CSS 0.25% HTML 0.62%

bxycloud's Introduction

Nacos SpringCloud SpringBoot iview vue License

SpringCloud微服务平台

开源不易,请随手给个Star! 感谢支持!

简介

便于企业快速搭建SpringCloud微服务架构体系,并为APP端、WEB应用提供更安全有效接口对接能力。

  • 基于SpringCloud微服务分布式架构,基于Nacos统一服务发现与配置中心
  • 基于Spring Security、Oauth2的权限管理系统
  • 基于Spring Gateway、Zuul统一网关,提供APP端、第三方服务对接平台。支持(参数签名校验、第三方应用认证授权、接口限流、接口访问限制、接口状态控制)
  • 基于Vue开发的前后分离系统
  • 提供对常见容器化支持 Docker、Kubernetes的支持

交流群: 807571015

qq群.png 微服务交流群

加群前请先将下方项目点star,支持下群主,谢谢😘
  • 后台默认账号:admin 123456
  • 后台测试账号:test 123456
  • SpringBootAdmin账号:sba 123456

核心依赖

依赖 版本
Spring Boot 2.2.6.RELEASE
Spring Cloud Greenwich.SR2
Spring Alibaba Cloud 2.1.0.RELEASE
Mybatis Plus 3.1.1
elementui 4.0.0
hutool 4.1.19

支持一杯咖啡 image

架构图

流程图设计:processon.com

image

代码结构

open-cloud-pro
├── docs                               -- 文档及脚本
    ├── bin                            -- 执行脚本  
    ├── config                         -- 公共配置,用于导入到nacos配置中心   
    ├── sql                            -- sql文件
    
├── clients                            -- 微服务fegin接口
    ├── bpm-client                     -- 工作流服务接口(Flowable)
    ├── job-client                     -- 定时任务服务接口
    ├── msg-client                     -- 消息服务接口
    ├── system-client                  -- 系统服务接口
    ├── README.md                      -- 开发文档说明
    
├── components                         -- 公共组件
    ├── common-core                    -- 提供工具类、封装类、全局异常解析等
    ├── common-starter                 -- SpringBoot自动配置类
    ├── java-sdk                       -- 开放api第三方集成SDK(完善中...)
    ├── tenant-starter                 -- 多租户模块,多数据源自动切换(完善中...)
 
├── dependencies                       -- jar包版本管理
    ├── cloud-clients-dependencies     -- 业务组件版本管理
    ├── cloud-dependencies             -- 所有jar版本管理
    ├── README.md                      -- 开发文档说明
    
├── gateway                            -- 网关
    ├── api-gateway-server             -- 开放API网关(基于SpringGateway)[8888]
    ├── README.md                      -- 开发文档说明
     
├── samples                            -- 演示示例
    ├── sso-ui-demo                    -- 单点登录客户端演示  
    
├── server                             -- 应用服务
    ├── admin-server                   -- 后台认证服务&资源服务[8211]
    ├── generator-server               -- 代码生成
    ├── sba-server                     -- SpringbootAdmin监控服务
    ├── site-server                    -- 官网认证服务&资源服务
    ├── README.md                      -- 开发文档说明
    
├── services                           -- 微服务
    ├── bpm-service                     -- 工作流服务[8255]
    ├── msg-service                     -- 消息服务[8266]
    ├── job-service                     -- 调度服务[8501]
    ├── system-service                  -- 系统管理服务[8233]
    ├── README.md                      -- 开发文档说明

快速开始

本项目基于springCloud打造的分布式快速开发框架. 需要了解SpringCloud,SpringBoot,SpringSecurity,分布式原理。

  1. 准备环境

    • Java1.8 (v1.8.0_131+)
    • Nacos服务注册和配置中心(v1.0.0+) 阿里巴巴nacos.io
    • Redis (v3.2.00+)
    • RabbitMq (v3.7+)(需安装rabbitmq_delayed_message_exchange插件 下载地址
    • Mysql (v5.5.28+)
    • Maven (v3+)
    • Nodejs (v10.14.2+)
  2. 执行创建数据库open-cloud 并执行/docs/sql下所有sql脚本

  3. 启动nacos服务,新建公共配置文件

    如图: nacos

  4. 修改主pom.xml

    初始化maven项目

        maven clean install
    

    本地启动,默认不用修改

        <!--Nacos配置中心地址-->
        <config.server-addr>127.0.0.1:8848</config.server-addr>
        <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
        <config.namespace></config.namespace>
        <!--Nacos服务发现地址-->
        <discovery.server-addr>127.0.0.1:8848</discovery.server-addr>
  5. 本地启动(按顺序启动)

    1. [必需]SystemServiceApplication(系统服务)
    2. [必需]AdminApplication(后台服务)
    3. [必需]ApiGatewayApplication(开放网关)
       访问 http://localhost:8888
    

    4.[非必需]SpringBootAdmin(监控服务器)(非必需)

        访问 http://localhost:8849
    
  6. 前端启动

        npm install 
        npm run dev
    

    访问 http://localhost:8080

  7. 项目打包部署

    • maven多环境打包,替换变量
      mvn clean install package -P {dev|test|online}
    
    • 项目启动
    ./docs/bin/startup.sh {start|stop|restart|status} system-service.jar
    ./docs/bin/startup.sh {start|stop|restart|status} admin-server.jar
    ./docs/bin/startup.sh {start|stop|restart|status} api-spring-server.jar
    

8.docker部署

  • 配置DOCKER私服仓库
  • maven多环境打包,替换变量.并构建docker镜像
       clean install package -P {dev|test|online} dockerfile:build 
    
  • 启动docker容器
      docker run -d -e JAVA_OPTS="-Xms128m -Xmx256m" -p 8233:8233 --name system-service cloud.pro/system-service:1.0.0
      docker run -d -e JAVA_OPTS="-Xms128m -Xmx256m" -p 8211:8211 --name admin-server cloud.pro/admin-server:1.0.0
      docker run -d -e JAVA_OPTS="-Xms128m -Xmx256m" -p 8888:8888 --name api-gateway-server cloud.pro/api-gateway-server:1.0.0
    

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.