All Projects → zhangxd1989 → Spring Boot Cloud

zhangxd1989 / Spring Boot Cloud

基于 Spring Boot、Spring Cloud、Spring Oauth2 和 Spring Cloud Netflix 等框架构建的微服务项目

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Boot Cloud

Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+234.59%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, consul, zipkin, hystrix
Springcloudlearning
《史上最简单的Spring Cloud教程源码》
Stars: ✭ 16,218 (+693.44%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, feign, consul, hystrix
tictactoe-microservices-example
An example of Spring Cloud Microservices application based on books (see Links section)
Stars: ✭ 23 (-98.87%)
Mutual labels:  spring-cloud, spring-boot-admin, zuul, hystrix, ribbon, eureka, zipkin
Sample Spring Microservices
Many samples in different branches that shows how to create microservices with Spring Boot, Spring Cloud, Zipkin, Zuul, Eureka, Hystrix, Kubernetes, Elastic Stack and many more tools
Stars: ✭ 368 (-82%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, zipkin, hystrix
Spring Cloud Learning
☁️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、服务网关、配置中心、熔断机制、应用监控。
Stars: ✭ 37 (-98.19%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, feign, consul
Spring Cloud
SpringCloud微服务架构,提供快速上手脚手架,快速构建高可用注册中心,高可用配置中心,加入Hystrix断路器,gateway服务官网,权限认证、服务降级、限流,加入应用监控
Stars: ✭ 130 (-93.64%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, feign, hystrix
Spring Petclinic Microservices
Distributed version of Spring Petclinic built with Spring Cloud
Stars: ✭ 814 (-60.18%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, zipkin, hystrix
Fw Spring Cloud
SpringCloud构建实战、从入门到高级,包含eureka、zuul、gateway、feign、ribbon、hystrix、mq、turbine、nacos、elk、consul、zookeeper、rocketmq、kafka、分布式事务(RocketMq、LCN、Seata)、分库分表(Sharding-JDBC)、分布式锁(Redis、Guava)、jwt、SkyWalking、Zipkin、bootadmin等使用案例
Stars: ✭ 276 (-86.5%)
Mutual labels:  ribbon, zuul, feign, consul, zipkin, hystrix
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-96.92%)
Mutual labels:  eureka, spring-cloud, zuul, feign, consul, zipkin
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-97.8%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, oauth
Spring Samples For All
spring、spring-boot、spring-cloud 常用整合用例
Stars: ✭ 401 (-80.38%)
Mutual labels:  eureka, ribbon, zuul, zipkin, hystrix
Sample Spring Microservices New
Demo for Spring Boot 2 and Spring Cloud microservices with distributed configuration (Spring Cloud Config), service discovery (Eureka), API gateway (Spring Cloud Gateway, Zuul), Swagger2 API documentation, logs correlation using Spring Cloud Sleuth and many more
Stars: ✭ 559 (-72.65%)
Mutual labels:  eureka, spring-cloud, ribbon, zuul, feign
Spring Cloud Study
SpringCloud源码实战微服务框架(202003更新到SpringCloud的Greenwich版本,即基于SpringBoot2.1.7版本,以及新增SpringCloud Alibaba从入门到精通教程),涉及内容:配置中心,注册中心,服务提供者,服务消费者,熔断器,配置服务,API Gateway,API网关限流ratelimit,服务链路追踪zipkin,hystrix监控,监控聚合中心turbine等
Stars: ✭ 215 (-89.48%)
Mutual labels:  eureka, ribbon, zuul, feign, hystrix
Spring Cloud Examples
Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等
Stars: ✭ 5,829 (+185.18%)
Mutual labels:  eureka, spring-cloud, zuul, hystrix, turbine
Springcloudexamples
Spring Cloud 学习教程
Stars: ✭ 208 (-89.82%)
Mutual labels:  eureka, spring-cloud, ribbon, feign, consul
Advanced Java
😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
Stars: ✭ 59,142 (+2793.44%)
Mutual labels:  eureka, spring-cloud, ribbon, feign, hystrix
spring-microservices
Example of a microservice architecture using Spring Cloud
Stars: ✭ 76 (-96.28%)
Mutual labels:  spring-cloud, zuul, hystrix, ribbon, eureka
Springcloud Learning
学习Spring Cloud框架的总结,使用的是最新的Hoxton版本。主要对包括但不限于Eureka、Ribbon、Hystrix、Zuul、Gateway、Security、Bus、OpenFeign等核心组件的用法进行详细介绍。
Stars: ✭ 129 (-93.69%)
Mutual labels:  eureka, ribbon, zuul, hystrix
Jbone
jbone基于Spring Cloud框架开发,旨在为中小企业提供稳定的微服务解决方案,为开发人员提供基础开发骨架,jbone包含微服务中所有常用组件,例如注册中心、服务管理、服务监控、JVM监控、内存分析、调用链跟踪、API网关等等。业务功能包括系统权限的统一管理、单点登录、CMS、电商平台、工作流平台、支付平台等等。
Stars: ✭ 961 (-52.98%)
Mutual labels:  eureka, spring-cloud, feign, hystrix
Lamp Cloud
lamp-cloud 基于Jdk11 + SpringCloud + SpringBoot的微服务快速开发平台,其中的可配置的SaaS功能尤其闪耀, 具备RBAC功能、网关统一鉴权、Xss防跨站攻击、自动代码生成、多种存储系统、分布式事务、分布式定时任务等多个模块,支持多业务系统并行开发, 支持多服务并行开发,可以作为后端服务的开发脚手架。代码简洁,注释齐全,架构清晰,非常适合学习和企业作为基础框架使用。
Stars: ✭ 4,125 (+101.81%)
Mutual labels:  eureka, spring-cloud, zuul, hystrix

基于 Spring Cloud 的微服务架构

本项目是一个基于 Spring Boot、Spring Cloud、Spring Oauth2 和 Spring Cloud Netflix 等框架构建的微服务项目。

技术栈

  • Spring boot - 微服务的入门级微框架,用来简化 Spring 应用的初始搭建以及开发过程。
  • Eureka - 云端服务发现,一个基于 REST 的服务,用于定位服务,以实现云端中间层服务发现和故障转移。
  • Spring Cloud Config - 配置管理工具包,让你可以把配置放到远程服务器,集中化管理集群配置,目前支持本地存储、Git 以及 Subversion。
  • Hystrix - 熔断器,容错管理工具,旨在通过熔断机制控制服务和第三方库的节点,从而对延迟和故障提供更强大的容错能力。
  • Zuul - Zuul 是在云平台上提供动态路由,监控,弹性,安全等边缘服务的框架。Zuul 相当于是设备和 Netflix 流应用的 Web 网站后端所有请求的前门。
  • Spring Cloud Bus - 事件、消息总线,用于在集群(例如,配置变化事件)中传播状态变化,可与 Spring Cloud Config 联合实现热部署。
  • Spring Cloud Sleuth - 日志收集工具包,封装了 Dapper 和 log-based 追踪以及 Zipkin 和 HTrace 操作,为 SpringCloud 应用实现了一种分布式追踪解决方案。
  • Ribbon - 提供云端负载均衡,有多种负载均衡策略可供选择,可配合服务发现和断路器使用。
  • Turbine - Turbine 是聚合服务器发送事件流数据的一个工具,用来监控集群下 hystrix 的 metrics 情况。
  • Spring Cloud Stream - Spring 数据流操作开发包,封装了与 Redis、Rabbit、Kafka 等发送接收消息。
  • Feign - Feign 是一种声明式、模板化的 HTTP 客户端。
  • Spring Cloud OAuth2 - 基于 Spring Security 和 OAuth2 的安全工具包,为你的应用程序添加安全控制。

应用架构

该项目包含 8 个服务

  • registry - 服务注册与发现
  • config - 外部配置
  • monitor - 监控
  • zipkin - 分布式跟踪
  • gateway - 代理所有微服务的接口网关
  • auth-service - OAuth2 认证服务
  • svca-service - 业务服务A
  • svcb-service - 业务服务B

体系架构

architecture

应用组件

components

启动项目

  • 使用 Docker 快速启动
    1. 配置 Docker 环境
    2. mvn clean package 打包项目及 Docker 镜像
    3. 在项目根目录下执行 docker-compose up -d 启动所有项目
  • 本地手动启动
    1. 配置 rabbitmq
    2. 修改 hosts 将主机名指向到本地
      127.0.0.1 registry config monitor rabbitmq auth-service
      或者修改各服务配置文件中的相应主机名为本地 ip
    3. 启动 registry、config、monitor、zipkin
    4. 启动 gateway、auth-service、svca-service、svcb-service

项目预览

注册中心

访问 http://localhost:8761/ 默认账号 user,密码 password

registry

监控

访问 http://localhost:8040/ 默认账号 admin,密码 admin

控制面板

monitor

应用注册历史

monitor

Turbine Hystrix面板

monitor

应用信息、健康状况、垃圾回收等详情

monitor

计数器

monitor

查看和修改环境变量

monitor

管理 Logback 日志级别

monitor

查看并使用 JMX

monitor

查看线程

monitor

认证历史

monitor

查看 Http 请求轨迹

monitor

Hystrix 面板

monitor

链路跟踪

访问 http://localhost:9411/ 默认账号 admin,密码 admin

控制面板

zipkin

链路跟踪明细

zipkin

服务依赖关系

zipkin

RabbitMQ 监控

Docker 启动访问 http://localhost:15673/ 默认账号 guest,密码 guest(本地 rabbit 管理系统默认端口15672)

rabbit

接口测试

  1. 获取 Token
curl -X POST -vu client:secret http://localhost:8060/uaa/oauth/token -H "Accept: application/json" -d "password=password&username=anil&grant_type=password&scope=read%20write"

返回如下格式数据:

{
  "access_token": "eac56504-c4f0-4706-b72e-3dc3acdf45e9",
  "token_type": "bearer",
  "refresh_token": "da1007dc-683c-4309-965d-370b15aa4aeb",
  "expires_in": 3599,
  "scope": "read write"
}
  1. 使用 access token 访问 service a 接口
curl -i -H "Authorization: Bearer eac56504-c4f0-4706-b72e-3dc3acdf45e9" http://localhost:8060/svca

返回如下数据:

svca-service (172.18.0.8:8080)===>name:zhangxd
svcb-service (172.18.0.2:8070)===>Say Hello
  1. 使用 access token 访问 service b 接口
curl -i -H "Authorization: Bearer eac56504-c4f0-4706-b72e-3dc3acdf45e9" http://localhost:8060/svcb

返回如下数据:

svcb-service (172.18.0.2:8070)===>Say Hello
  1. 使用 refresh token 刷新 token
curl -X POST -vu client:secret http://localhost:8060/uaa/oauth/token -H "Accept: application/json" -d "grant_type=refresh_token&refresh_token=da1007dc-683c-4309-965d-370b15aa4aeb"

返回更新后的 Token:

{
  "access_token": "63ff57ce-f140-482e-ba7e-b6f29df35c88",
  "token_type": "bearer",
  "refresh_token": "da1007dc-683c-4309-965d-370b15aa4aeb",
  "expires_in": 3599,
  "scope": "read write"
}
  1. 刷新配置
curl -X POST -vu user:password http://localhost:8888/bus/refresh
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].