Giter Site home page Giter Site logo

springcloudlearning's Introduction

Spring Cloud学习笔记

觉得灵洛整理的不错的朋友,star一下哟,(* ̄︶ ̄)

项目版本

  • 使用IDEA完成
  • spring cloud版本:Dalston.SR1
  • spring boot版本:1.5.19.RELEASE

项目模块说明

SpringCloudLearning
├── lingluocloud-api -- 构建公共子模块 + Hystrix服务降级
├── lingluocloud-euraka-7001 -- Eureka集群
├── lingluocloud-euraka-7002 -- Eureka集群
├── lingluocloud-euraka-7003 -- Eureka集群
├── lingluocloud-provider-dept-8001 -- 构建服务提供者集群
├── lingluocloud-provider-dept-8002 -- 构建服务提供者集群
├── lingluocloud-provider-dept-8003 -- 构建服务提供者集群
├── lingluocloud-consumer-dept-80 -- 构建服务消费者
├── lingluocloud-consumer-dept-feign -- 构建服务消费者
├── lingluocloud-provider-dept-hystrix-8001 -- Hystrix服务熔断
├── lingluocloud-consumer-hystrix-dashboard -- Hystrix调用监控 
├── lingluocloud-zuul-gateway-9527 -- Zuul路由网关 
├── lingluocloud-config-3344 -- config服务端 
└── lingluocloud-config-client-3355 -- config客户端

项目搭建

项目启动

  1. 启动euraka-service端集群:

    • [lingluocloud-euraka-7001]
    • [lingluocloud-euraka-7002]
    • [lingluocloud-euraka-7003]
  2. 启动微服务提供者集群:

    • [lingluocloud-provider-dept-8001 (连01数据库)]
    • [lingluocloud-provider-dept-8002 (连02数据库)]
    • [lingluocloud-provider-dept-8003 (连03数据库)]
  3. 启动为服务消费者:

    以下两者二选一启动,它两主要区别(具体见笔记中第四小节)是:
    dept-80:Ribbon+RestTemplate 调用Rest服务
    dept-feign:Feign+接口 调用Rest服务(优雅简单)

    • [lingluocloud-consumer-dept-80 (含Ribbon客户端负载均衡)]
    • [lingluocloud-consumer-dept-feign (含Feign负载均衡、Hystrix服务降级)]
  4. Hystrix 服务熔断、降级、监控

    服务熔断:
    缺点就是每一个方法对应都得写一个fallBackMethod方法,代码膨胀,所以我们之后看服务降级(^__^)
    主要在单个服务出异常的时候用

    服务降级:
    统一处理主业务与熔断方法解耦,是在客户端(消费者)处理完成的,与服务端没关系
    主要在单个服务整个被关闭的时候用

    • [lingluocloud-provider-dept-hystrix-8001 (Hystrix服务熔断)]
    • [lingluocloud-api (Hystrix服务降级)]
    • [lingluocloud-consumer-hystrix-dashboard (Hystrix调用监控)]
  5. Zuul 路由网关

    • [lingluocloudzuul-gateway-9527 (Zuul路由网关)]
  6. Config 分布式配置中心

    • [lingluocloud-config-3344 (config服务端)]
    • [lingluocloud-config-client-3355 (config客户端)]

springcloudlearning's People

Contributors

littlecatbobi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

qlovechen hecion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.