01 2020 档案

摘要:我使用浏览器缓存local storage做设计。 设计时候我们本应该第一步进入首页,但我们就进行一个设计转换,我们先进一个临时页面。 第一步:判断local storage是否有我们特定设计的缓存,叫launchFlag吧! 第二步:我们可以进行一个判断跳转,有我们就去首页,没有我们就去温情页。 阅读全文
posted @ 2020-01-17 01:54 fishness 阅读(122) 评论(0) 推荐(0) 编辑
摘要:实现思想: 负载均衡算法:请求书%服务器数量得到实际服务器下标HttpClient进行调用 利用DiscoveryClient 1.注入@Autowired private DiscoveryClient discoveryClient 2.List<ServiceInstance> discove 阅读全文
posted @ 2020-01-15 18:03 fishness 阅读(310) 评论(0) 推荐(0) 编辑
摘要:1.创建两个demo(我使用的是springboot)项目,分别整合了consul,端口分别2222,3333 2.yml配置(两个分别配置注册到consul) server: ##服务端口 port: 3333 spring: application: ##服务名称 name:consul clo 阅读全文
posted @ 2020-01-15 17:39 fishness 阅读(1245) 评论(0) 推荐(0) 编辑
摘要:1.创建两个demo(我使用的是springboot)项目,分别整合了zookeeper,端口分别2222,3333 2.yml配置(两个分别配置注册到zookeeper) server: ##服务端口 port: 3333 spring: application: ##服务名称 name:zk c 阅读全文
posted @ 2020-01-15 17:36 fishness 阅读(605) 评论(0) 推荐(0) 编辑
摘要:1.创建两个eureka注册中心项目作为demo,访问端口分别为7777,8888 2.yml配置将(配置端口互相互换即可) server: port: 7777 eureka: instance: hostname: 127.0.0.1 client: ###因为自己是注册中心,是否需要将自己注册 阅读全文
posted @ 2020-01-15 17:16 fishness 阅读(169) 评论(0) 推荐(0) 编辑
摘要:1.加入依赖 <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </ 阅读全文
posted @ 2020-01-15 16:54 fishness 阅读(277) 评论(0) 推荐(0) 编辑
摘要:1.https://www.consul.io下载consul,解压 2.cmd进入解压盘,输入命令 consul agent -dev -ui -node=cy 3.访问 http://127.0.0.1:8500 4.springcloud项目中加入整合依赖 <dependencies> <!- 阅读全文
posted @ 2020-01-15 16:41 fishness 阅读(396) 评论(0) 推荐(0) 编辑
摘要:1.下载zookeeper,修改/conf 的zoo_sample.cfg为zoo.cfg 2.启动 bin/zkServer.cmd 3.加入整合依赖 <dependencies> <!--省略其他框架依赖--> <dependency> <groupId>org.springframework. 阅读全文
posted @ 2020-01-15 16:39 fishness 阅读(1548) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示