1 Star 0 Fork 792

huaishuiguwu / open-cloud

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

Nacos SpringCloud SpringBoot iview vue License

微服务开放平台


简介

搭建基于OAuth2的开放平台、为APP端提供统一接口管控平台、为第三方合作伙伴的业务对接提供授信可控的技术对接平台.

  • 统一API网关、访问鉴权、参数验签、外部调用更安全.
  • 分布式架构,基于服务发现,Fegin(伪RPC)方式内部调用,更便捷.
  • 深度整合SpringCloud+SpringSecurity+Oauth2,更细粒度、灵活的ABAC权限控制.
  • 前后端分离方式开发应用,分工合作更高效!
  • 代码合理封装、简单易懂、

在线访问

默认登录账号:admin 123456 测试登录账号:test 123456

代码仓库

请随手给个Star! 感谢支持!

服务端源码-码云

服务端源码-Github

前端ui源码

使用手册

代码结构

open-cloud
├── docs
    ├── bin           -- 执行脚本  
    ├── config        -- 公共配置,用于导入到nacos配置中心   
    ├── generator     -- mapper生成器  
    ├── sql           -- sql文件
    
├── opencloud-common  -- 公共类和jar包依赖
    ├── opencloud-common-core    -- 提供微服务相关依赖包、工具类、全局异常解析等...
    ├── opencloud-common-starter -- SpringBoot自动扫描
    
├── opencloud-gateway  -- API网关模块
    ├── opencloud-gateway-client    -- API网关接口
    ├── opencloud-gateway-provider  -- API网关(port = 8888)  
    
├── opencloud-upms    --  通用权限模块
    ├── opencloud-base-client    -- 平台基础服务接口
    ├── opencloud-base-provider  -- 平台基础服务(port = 8233)  
    ├── opencloud-auth-client    -- 平台认证服务接口
    ├── opencloud-auth-provider  -- 平台认证服务(port = 8211)  
    
├── opencloud-app    -- 应用服务模块
    ├── opencloud-admin-provider  -- 运营后台服务(port = 8301)  

├── opencloud-msg     -- 公共消息模块 
    ├── opencloud-msg-client    -- 消息服务接口
    ├── opencloud-msg-provider  -- 消息服务(port = 8266)  
    
├── opencloud-bpm     -- 公共工作流模块...  
    ├── opencloud-bpm-client   -- 工作流接口
    ├── opencloud-bpm-provider -- 工作流服务(port = 8255)
    
├── opencloud-zipkin  -- 链路追踪 

系统结构图

springcloud

数据模型

基础权限模型

base

网关访问限制模型

gateway

快速开始

上手难度:★★★

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

注:Nacos版本选择V0.9.0以下版本. 1.0.0以上版本暂未测试!

  1. 准备环境

    • Java1.8
    • 阿里巴巴Nacos服务发现和注册中心 nacos.io
    • Redis
    • RabbitMq
    • Mysql
    • Maven
    • Nodejs
  2. 导入sql脚本

    • docs/sql/oauth2.sql
    • docs/sql/base.sql
    • docs/sql/gateway.sql
    • docs/sql/zipkin.sql
  3. 导入Nacos公共配置

    • 访问 http://localhost:8848/nacos/index.html
    • 新建配置
      • docs/config/db.properties > db.properties
      • docs/config/rabbitmq.properties > rabbitmq.properties
      • docs/config/redis.properties > redis.properties
      • docs/config/common.properties > common.properties
  4. 修改主pom.xml

    初始化

        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. 本地启动

    • AuthApplication
    • BaseApplication
    • GatewayApplication
    • AdminApplication
      4个服务启动成功后。就可以依赖这些服务进行微服务开发了。
      访问 http://localhost:8888
  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} open-base-provider.jar
    ./docs/bin/startup.sh {start|stop|restart|status} open-auth-provider.jar
    ./docs/bin/startup.sh {start|stop|restart|status} open-gateway-provider.jar
    ./docs/bin/startup.sh {start|stop|restart|status} open-admin-provider.jar

第三方接口调用

更新日志

v-1.0.0 2019-03-18
    1. 重构项目结构
    2. 重构表结构
    3. 重构授权逻辑
    4. 提取公共配置,并迁移到Nacos配置中心
    5. 优化功能

问题反馈

交流群:760809808 open-cloud学习交流群
760809808

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.

简介

微服务开放平台-基于SpringCloud2.0+,SpringSecurity,Oauth2,nacos服务发现和配置管理.统一API网关,在线调试文档,身份认证,接口鉴权,限流等。搭建基于API的生态体系,微服务架构的企业级开放平台,利于业务扩容。并提供基于vue.js开发的平台运维系统,界面美观,易操作。项目结构清晰,简单易懂,代码合理封装.开箱即用。 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助