1 Star 0 Fork 6

hanhys / KCloud-Platform-Official

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

项目备注

项目:KCloud-Platform-Official
作者:老寇
语言:Java
职位:Java工程师
时间:2020.06.08 ~ 至今

项目介绍

KCloud-Platform-Official(老寇云平台)是一款企业级微服务架构的云服务平台。基于Spring Boot 2.7.5、Spring Cloud 2021.0.5等最新版本开发, 遵循SpringBoot编程思想,高度模块化和可配置化。具备服务注册&发现、配置中心、限流、熔断、降级、监控、多数据源、工作流、高亮搜索、定时任务、分布式缓存、分布式事务、分布式存储等功能,用于快速构建微服务项目。目前支持Shell、Docker等多种部署方式,实现RBAC权限、其中包含系统管理、系统监控、工作流程、数据分析等几大模块。 遵循阿里代码规范,代码简洁、架构清晰,非常适合作为基础框架使用。 更新日志

Gitee Star Gitee Fork SpringBoot License Apache 2.0

功能介绍

用户管理
角色管理
菜单管理
部门管理
日志管理
字典管理
消息管理
认证管理
搜索管理
资源管理
流程定义
流程任务
接口文档
数据监控
服务监控
主机监控

系统架构

技术体系

Spring全家桶及核心技术版本

组件 版本
Spring Boot 2.7.5
Spring Cloud 2021.0.5
Spring Boot Admin 2.7.5
Apollo 1.4.0
Mysql 5.7.9
Redis 6.0.6
Elasticsearch 7.6.2
Kafka 2.8.1

Spring 全家桶版本对应关系,详见:版本说明

相关技术

  • API 网关:Spring Cloud Gateway
  • 服务注册&发现:Eureka
  • 配置中心: Apollo
  • 认证授权:Spring Security OAuth2
  • 服务消费:Spring Cloud OpenFeign & RestTemplate & OkHttps
  • 负载均衡:Spring Cloud Loadbalancer
  • 服务熔断&降级&限流:Resilience4j
  • 服务监控:Spring Boot Admin、Prometheus
  • 消息队列:使用 Spring Cloud 消息总线 Spring Cloud Bus 默认 Kafka
  • 链路跟踪:Skywalking
  • 数据库:MySQL、Oracle
  • 数据缓存:Redis
  • 工作流:Flowable
  • 日志中心:ELK
  • 持久层框架:Mybatis Plus
  • JSON 序列化:Jackson
  • 文件服务:Local/阿里云 OSS/Fastdfs
  • 服务部署:Docker-Compose
  • 持续交付:Jenkins
  • 服务发布:金丝雀发布

项目结构

├── laokou-common
        └── laokou-common-bom               --- 依赖版本库
        └── laokou-common-core              --- 公共组件
        └── laokou-common-mybatis-plus      --- 对象映射组件
        └── laokou-common-swagger           --- 文档组件
├── laokou-cloud
        └── laokou-gateway                  --- API网关
        └── laokou-monitor                  --- 服务监控
        └── laokou-register                 --- 服务注册&发现
├── laokou-service
        └── laokou-admin                    --- 后台管理模块
        └── laokou-auth                     --- 认证授权模块
        └── laokou-generator                --- 模板模块
        └── laokou-modlule
                └── laokou-sms              --- 短信模块 
                └── laokou-email            --- 邮件模块
                └── laokou-oss              --- 对象存储模块    
                └── laokou-redis            --- 缓存模块     
                └── laokou-xxl-job          --- 工作模块   
                └── laokou-kafka            --- 消息模块    
                └── laokou-elasticsearch    --- 搜索模块     
                └── laokou-im               --- 即时通讯模块     

环境配置

安装教程

centos7 安装jdk1.8
centos7 安装mysql5.7
centos7 安装maven
centos7 安装apollo
centos7 安装redis
centos7 安装fastdfs
centos7 安装中文字体
centos7 安装jenkins
centos7 安装apr
centos7 安装nacos
centos7 安装elasticsearch7.6.2
centos7 安装kafka

安装包

百度网盘 提取码:1111

项目配置

服务配置

  # mysql
spring:
  datasource:
    druid:
      # 连接地址
      url: jdbc:mysql://127.0.0.1:3306/kcloud_platform?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
      # 用户名
      username: root
      # 密码
      password: 123456
  # redis
  redis:
    #数据库索引
    database: 0
    #主机
    host: 127.0.0.1
    #端口
    port: 6379
    #连接超时时长(毫秒)
    timeout: 6000ms 
# elasticsearch
elasticsearch:
  #主机
  host: 127.0.0.1:9200
  #节点
  cluster-name: elasticsearch-node

开启APR模式

代码引入
public class AuthApplication implements WebServerFactoryCustomizer<WebServerFactory> {
    @Override
    public void customize(WebServerFactory factory) {
        TomcatServletWebServerFactory containerFactory = (TomcatServletWebServerFactory) factory;
        containerFactory.setProtocol("org.apache.coyote.http11.Http11AprProtocol");
    }
}
VM options配置
-Djava.library.path=./lib

高版本JDK兼容

VM options配置
--add-opens=java.base/java.lang=ALL-UNNAMED

数据权限

代码引入
@Service
public class SysUserApplicationServiceImpl implements SysUserApplicationService {

    @Autowired
    private SysUserService sysUserService;

    @Override
    @DataFilter(tableAlias = "boot_sys_user")
    public IPage<SysUserVO> queryUserPage(SysUserQO qo) {
        IPage<SysUserVO> page = new Page<>(qo.getPageNum(),qo.getPageSize());
        return sysUserService.getUserPage(page,qo);
    }
}
XML配置
<if test="qo.sqlFilter != null and qo.sqlFilter != ''">
    and ( ${qo.sqlFilter} )
</if>

金丝雀发布

Apollo配置
[{
  {
    "id": "laokou-admin",
    "uri": "lb://laokou-admin",
    "predicates": [
      {
        "name": "Path",
        "args": {
          "_genkey_0": "/admin/**"
        }
      },
      {
        "name": "Weight",
        "args": {
          "_genkey_0": "admin",
          "_genkey_1": "50"
        }
      }
    ],
    "filters": [
      {
        "name": "StripPrefix",
        "args": {
          "_genkey_0": "1"
        }
      }
    ],
    "order": 0
  }
}]

高可用系统构建

  • 严格遵循阿里规范,注重代码质量
  • 使用集群,减少单点故障
  • 限流
  • 超时和重试机制
  • 熔断机制
  • 异步调用
  • 使用缓存
  • 其他(监控系统资源使用情况增加报警设置...)

演示地址

http://175.178.69.253
admin/admin123
test/test123
laok5/test123

项目截图

暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片
暂无图片 暂无图片

用户权益

  • 采用Apache2.0开源协议,并且承诺永不参与商业用途,仅供大家无偿使用
  • 采用Apache2.0开源协议,并且承诺永不参与商业用途,仅供大家无偿使用
  • 采用Apache2.0开源协议,并且承诺永不参与商业用途,仅供大家无偿使用

参与贡献

欢迎各路英雄好汉参与KCloud-Platform-Official代码贡献,期待您的加入!Fork本仓库 新建Feat_xxx分支提交代码,新建Pull Request

开源协议

KCloud-Platform-Official 开源软件遵循 Apache 2.0 协议 请务必保留作者、Copyright信息

项目地址

后端地址:KCloud-Platform-Official
前端地址:KCloud-Antdv-Official

致谢

Spring官网
人人社区
若依社区

联系

博客:https://kcloud.blog.csdn.net
邮箱:2413176044@qq.com
QQ:2413176044
后端技术交流群 加入QQ群

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

老寇云平台后端-Spring官方,欢迎小伙伴们贡献一份代码 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/hanhys/KCloud-Platform-Official.git
git@gitee.com:hanhys/KCloud-Platform-Official.git
hanhys
KCloud-Platform-Official
KCloud-Platform-Official
master

搜索帮助