微服务实验环境搭建

MicroService 微服务学习

目录结构

  1. eureka-client:测试使用
  2. eureka-client2:consumerB
  3. eureka-client3:consumerA
  4. eureka-server:注册中心
  5. gateway-service-zuul:网关中心
  6. hystrix-dashboard-turbine:monitor监控中心
  7. service:springboot应用
  8. config-server:测试注册中心使用

说明

对于eureka-client2,已添加zipkin依赖,可进行zipkin 链路检测日志采集中心实验;

对于eureka-client3,可进行hystrix熔断实验。

开启服务注册中心

将eureka-server的spring.profiles.active分别更改为dev,dev2,运行EurekaServerApplication.java,
点击url,出现以下界面,则开启成功!

image

开启服务,注册到eureka

将spring.profiles.active分别更改为dev,dev2,运行ServiceApplication.java
点击url,出现以下界面,则注册成功!

image

service8080

image

service8081

image

开启网关中心zuul

运行GatewayServiceZuulApplication.java,启动网关中心,点击url,出现以下界面,证明开启成功!

image

image

开启service consumer

启动eureka-client2,eureka-client3项目主类,点击url,出现以下界面,证明开启成功!

image

image

image

开启monitor监控中心

运行HystrixDashboardTurbineApplication.java,点击url,出现以下界面,证明开启成功!

image

github传送门:https://github.com/hand-mabu/MicroService/tree/master/menghui

posted @ 2019-07-27 12:42  孔乙己的茴香豆  阅读(275)  评论(0编辑  收藏  举报