Skip to content

Spring-cloud-各个组件的框架 Spring-boot-version=1.5.8.RELEASE Spring-cloud-version = Dalston.SR4

License

Notifications You must be signed in to change notification settings

nogeek-cn/spring-cloud-2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Cloud

架构图

1566080400917

版本

  • spring boot: 1.5.7
  • spring cloud : Dalston.SR4
  • JDK : 1.8

分支说明

项目目录

├─assets
├─feign-person-api
├─feign-person-client
├─feign-person-service-provider
├─feign-ribbon-hystrix-person-api
├─feign-ribbon-hystrix-person-client
├─feign-ribbon-hystrix-person-service-provider
├─git-config-path
├─rest-client-api
├─rest-user-consumer
├─rest-user-service-provider
├─ribbon-client-api
├─ribbon-user-consumer
├─ribbon-user-service-provider-7070
├─ribbon-user-service-provider-7071
├─ribbon-user-service-provider-7072
├─spring-cloud-config-client
├─spring-cloud-config-server-demo
├─spring-cloud-eureka-server-double-9090
├─spring-cloud-eureka-server-double-9091
├─spring-cloud-eureka-server-single-9090
├─spring-cloud-hystrix-client-demo
├─spring-cloud-hystrix-dashboard-demo
├─spring-cloud-sleuth-config-server-demo
├─spring-cloud-sleuth-person-api
├─spring-cloud-sleuth-person-client
├─spring-cloud-sleuth-person-service-provider
├─spring-cloud-sleuth-sleuth-demo
├─spring-cloud-sleuth-zipkin-server-demo
├─spring-cloud-sleuth-zuul-demo
├─spring-cloud-stream-kafka
├─spring-cloud-stream-kafka-stream-api
├─spring-cloud-stream-rabbitmq-stream-api
├─spring-cloud-zuul-config-server-demo
├─spring-cloud-zuul-person-api
├─spring-cloud-zuul-person-client
├─spring-cloud-zuul-person-service-provider
├─spring-cloud-zuul-proxy-demo

项目端口

项目 端口
config-client 10001
config-server 10000
rest-user-provider 7070
rest-user-consumer 8080
eureka-demo 9090
eureka-demo-9090 9090
eureka-demo-9091 9091
ribbon-user-consumer 8080
ribbon-user-provider-7070 7070
ribbon-user-provider-7071 7071
ribbon-user-provider-7072 7072
hystrix--client-demo 11001
hystrix-dashboard-demo 11002
feign-person-client 8080
feign-person-provider 7070
feign-ribbon-hystrix-person-client 8080
feign-ribbon-hystrix-person-service-provider 7070
spring-cloud-config-server-demo 9999
spring-cloud-zuul-proxy 12001
Zipkin-server 23456

Test

为了方便测试 添加用户 -> get 请求,自己使用时请改成 POST

Config

eureka

Ribbon

Hystrix

feign

feign-ribbon-hystrix

坑:

@GetMapping("person/save")
boolean save(@RequestParam("id") Long id, @RequestParam("name") String name);

feign 的自动提升为 POST 请求,需要注意

zuul+feign-ribbon-hystrix

stream

sleuth-stream-spring-cloud

zipkin

启动顺序

  • eureka

  • config-server 需要把 config 注册到 eureka 上

  • zuul

  • zipkin-server

  • sleuth-sleuth-demo


注意

环境配置

# 配置 Spring Kafka 配置信息
spring.kafka.bootstrap-servers=kafka.darian.com:9092
# 配置 kafka 的 zookeeper 的节点
spring.cloud.stream.kafka.binder.zk-nodes=zookeeper.darian.com:2181

‪C:\Windows\System32\drivers\etc\HOSTS 文件

192.168.40.128 kafka.darian.com
192.168.40.128 zookeeper.darian.com
2019-08-18 05:57:14.318  INFO [person-service,,,] 17404 --- [           main] o.s.c.s.b.k.p.KafkaTopicProvisioner      : Using kafka topic for outbound: sleuth

About

Spring-cloud-各个组件的框架 Spring-boot-version=1.5.8.RELEASE Spring-cloud-version = Dalston.SR4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published