1 Star 1 Fork 792

tomdev / open-cloud

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

搭建基于OAuth2的开放云平台

  1. 搭建基于API的生态体系
  2. 利用开放平台,搭建基于计费的API数据平台
  3. 为APP端提供统一接口管控平台
  4. 为第三方合作伙伴的业务对接提供授信可控的技术对接平台

技术架构

全新升级spring boot2.0+ 稳定版 springCloud Finchley.RELEASE
springBoot 2.0.4.RELEASE
redis
rabbitmq
mysql
alibaba nacos 服务发现和配置中心
layui 前端UI框架

项目结构

  • docs(文档说明)
    1. bin 执行脚本
    2. generator 代码生成器
    3. sql sql文件
  • opencloud-common(公共包)
    1. 提供微服务相关依赖包
    2. 封装微服务必要配置类并自动注入
    3. 工具类、全局异常解析、自定义错误码(支持国际化)、自定义属性配置、
  • opencloud-gateway(API网关)
    1. opencloud-gateway-client API网关-接口
    2. opencloud-gateway-producer API网关-资源服务器 (port = 8888)
      1. 提供接口调用统一入口:路由代理、API限流、API访问限制、API数字验签、API开发调试文档(生产环境不生效)
      2. 提供基于oauth2密码模式登录,返回access_token
      3. 提供内部数字签名接口
      4. 自定义刷新网关端点(支持一键刷新路由、限流等配置) [刷新路由/actuator/refresh-gateway](POST http://localhost:8888/actuator/refresh-gateway )
        [灰度刷新/actuator/refresh-gateway?destination=application:* ](POST http://localhost:8888/actuator/refresh-gateway?destination=application:* )
  • opencloud-upms(权限管理)
    1. opencloud-oauth-client 认证管理-接口
    2. opencloud-oauth-producer 认证管理-认证授权器和资源服务器 (port = 8211)
      1. 身份认证、授权,颁发有效令牌
      2. SSO单点认证登录,租户登录信息
      3. 客户端、令牌、授权管理
    3. opencloud-rbac-client 权限管理-接口
    4. opencloud-rbac-producer 权限管理-资源服务器 (port = 8233)
      1. 平台租户资料和登录账号管理
      2. 角色管理、授权
      3. 菜单资源、操作资源、API资源管理
      4. 应用管理、授权
  • opencloud-zipkin(微服务链路追踪)
  • opencloud-msg(消息管理) 开发中...
    1. opencloud-msg-client 消息服务-接口
    2. opencloud-msg-producer 消息服务-资源服务器 (port = 8266)
      1. 邮件消息
      2. 短信消息
      3. 推送消息
  • opencloud-acms(APP内容管理) 开发中...
    1. opencloud-acms-client APP内容管理-接口
    2. opencloud-acms-producer APP内容管理-资源服务器 (port = 8255)
      1. 版本升级
      2. 闪屏管理
      3. banner管理
      4. 广告管理
      5. 等...

项目配置

支持多环境(dev、test、online):修改主项目pom.xml中的profiles节点
修改关键配置项:

  1. 配置中心地址:<config.server-addr>127.0.0.1:8848</config.server-addr>
  2. 服务发现地址:<discovery.server-addr>127.0.0.1:8848</discovery.server-addr>
  3. 认证授权地址:<auth.server-addr>http://localhost:8211</auth.server-addr>
  4. 网关服务地址:<gateway.server-addr>http://localhost:8888</gateway.server-addr>

项目部署

打包不同环境:mvn clean install package -P {dev|test|online}
启动脚本:./start.sh {start|stop|restart|status} {service}.jar
启动顺序:

  1. 安装并启动nacos服务发现
  2. opencloud-rbac-producer
  3. opencloud-oauth-producer
  4. opencloud-gateway-producer
  5. opencloud-admin
    访问接口文档:http://localhost:8888/
    访问运维后台:http://localhost:8801/
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.

简介

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

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助