摘要: 在原有的工程上,创建一个新的工程 创建service-zuul工程 其pom.xml文件如下: <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="ht 阅读全文
posted @ 2019-09-20 19:54 wm根mw 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 在ribbon使用断路器 改造serice-ribbon 工程的代码,首先在pox.xml文件中加入spring-cloud-starter-hystrix的起步依赖: 引入 <dependency> <groupId>org.springframework.cloud</groupId> <art 阅读全文
posted @ 2019-09-20 15:25 wm根mw 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 基于上一篇文章的工程,启动eureka-server 工程;启动service-hi工程,它的端口为8765;将service-hi的配置文件的端口改为8763,并启动,这时你会发现:service-hi在eureka-server注册了2个实例,这就相当于一个小的集群。 重新新建一个spring- 阅读全文
posted @ 2019-09-20 15:02 wm根mw 阅读(350) 评论(0) 推荐(0) 编辑
摘要: pom.xml配置 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc 阅读全文
posted @ 2019-09-20 14:09 wm根mw 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 前提:SpringBoot可以离开SpringCloud独立使用开发项目,但是SpringCloud离不开SpringBoot,属于依赖的关系. 所以基本是搭建SpringBoot + 组件 = SpringCloud 什么是Spring Cloud 1、Spring Cloud它不是一个具体的框架 阅读全文
posted @ 2019-09-20 10:55 wm根mw 阅读(434) 评论(0) 推荐(2) 编辑