1 Star 0 Fork 30

whatjx / open-cloud-pro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Nacos SpringCloud SpringBoot iview vue License

SpringCloud微服务平台(专业版)

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

简介

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

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

在线体验 | 专业版服务端源码 | 专业版UI源码

  • 后台默认账号:admin 123456
  • 后台测试账号:test 123456
  • SpringBootAdmin账号:sba 123456

核心依赖

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

架构图

流程图设计:processon.com
image

jmeter压力测试

单机:window10 i5-9400f 2.9ghz 6核 16G 测试用例:300秒内模拟10000用户登陆。 image

使用手册

使用手册

交流群

学习交流(千人群):760809808 open-cloud交流群

代码结构

open-cloud-pro
├── docs                               -- 文档及脚本
    ├── bin                            -- 执行脚本  
    ├── config                         -- 公共配置,用于导入到nacos配置中心   
    ├── sql                            -- sql文件
    
├── clients                            -- 微服务fegin接口
    ├── bpm-client                     -- 工作流服务接口
    ├── 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]
    ├── api-zuul-server                -- 开放API网关(基于Zuul)[8888]
    ├── README.md                      -- 开发文档说明
     
├── samples                            -- 演示示例
    ├── sso-ui-demo                    -- 单点登录客户端演示  
    ├── tenant-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(开放网关)或ApiZuulApplication
       访问 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

OAuth2使用说明

OAuth2

The MIT License (MIT) Copyright (c) 2018 刘亚都 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/whatjx/open-cloud-pro.git
git@gitee.com:whatjx/open-cloud-pro.git
whatjx
open-cloud-pro
open-cloud-pro
master

搜索帮助