名称: 尚硅谷2020最新版SpringCloud(H版&alibaba) 时长: 26 H 集数: 150 作者: 周阳 21章 14种组件技术 10天的学习周期
-------基础P1~P14 (20201018—20201021) -------初级P15~P46 (20201022— ) -------中级P -------高级P
https://www.bilibili.com/video/BV18E411x7eT?p=16
https://www.bilibili.com/video/BV18E411x7eT?p=16
支付微服务8001(作为eureka客户端) 入驻eureka 服务端 7001 https://www.bilibili.com/video/BV18E411x7eT?p=17
订单微服务8001(作为eureka客户端) 入驻eureka 服务端 7001 https://www.bilibili.com/video/BV18E411x7eT?p=18
— 01 eureka 服务注册中心 http://localhost:7001/ — 浏览器中效果更好 (postman)
------- 02 直接 访问服务提供接口 http://localhost:8001/payment/get/3 ----postman 中 直接调用 get 方法 localhost:8001/payment/create4Direct?serial=param1 ----postman 中 直接调用 post 方法
------- 03 调用客户端 客户端调用 访问服务提供接口 http://localhost:80/consumer/payment/get/2 ----postman 中 直接调用 post 方法 调用客户端 http://localhost:80/consumer/payment/create?serial=1628 ----postman 中 直接调用 post 方法 调用客户端
– cloud-eureka-server7001 访问注册中心 – cloud-eureka-server7002 访问注册中心 互为罐头(备份)
打开“运行”对话框,然后键入hosts文件路径:C:\WINDOWS\system32\drivers\etc 完成后,点击下方的“确定”打开。
#leo eureka集群配置 127.0.0.1 eureka7001.com 127.0.0.1 eureka7002.com
20 Eureka集群环境构建 https://www.bilibili.com/video/BV18E411x7eT?p=20 — 01 eureka 服务注册中心 集群配置好后 如下几个都可以访问 http://localhost:7001/ — 浏览器中效果更好 http://localhost:7002/ http://eureka7002.com:7002/ http://eureka7001.com:7001/
配置8001 注册到 7001 7002 集群 配置80 注册到 7001 7002 集群 后的效果
访问微服务接口80, 看 从 80 到 7001/7002 到 8001 是否成功 http://localhost/consumer/payment/get/1 http://localhost:80/consumer/payment/get/1
22 支付微服务集群配置 https://www.bilibili.com/video/BV18E411x7eT?p=22
http://localhost/consumer/payment/get/1
actuator微服务信息完善 主机名修改: ip信息提示:注册 EurekaDiscoveryClient 服务(step1),并提供 访问方法(step2) step3 主函数暴露服务
http://localhost:8001/payment/discovery
之前开启保护模式的时候, 7001 启动了,8001 启动了 , 8001 关闭了 查看 7001 上面的eureka服务 8001 一直都在
经过上面两步的配置后,关闭保护模式的时候, 7001 启动了,8001 启动了 , 8001 关闭了 (3庙后)查看 7001 上面的eureka服务 8001 消失https://github.com/Netflix/eureka/wiki