摘要: https://www.jianshu.com/p/5c5753d2aeb0 eureka是AP:满足可用性 zookeeper是cp(满足一致性,分区容忍的系统),在Zookeeper运行期间,即便当有非Leader服务器宕机或新加入,此时也不会影响Leader,但是一旦,zookeeper-le 阅读全文
posted @ 2019-12-18 20:20 ZJfor 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 步骤: 1.生产者启动时会将自己的服务信息写入注册信息(ip /port /服务名称 ); 2.注册中心会动态的管理服务信息 3.当消费者启动时,注册中心会将注册信息发送给消费者端,消费者并缓存到本地,方便消费者下次访问 4.当用户发起请求时,会经过http协议访问服务器消费者,服务器消费者经过负载 阅读全文
posted @ 2019-12-18 13:39 ZJfor 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 所在的包:import com.alibaba.dubbo.config.annotation.Reference;@Reference import org.springframework.beans.factory.annotation.Autowired;@Autowired import j 阅读全文
posted @ 2019-12-17 20:27 ZJfor 阅读(1920) 评论(0) 推荐(0) 编辑
摘要: 方案:由于html的同源策略不能访问,利用javascript中src属性的开放策略解决 这种策略为jsonp:JSONP(JSON with Padding)是JSON的一种“使用模式”,可用于解决主流浏览器的跨域数据访问的问题 跨域思想: 1.利用javascript中的src属性 2.定义回调 阅读全文
posted @ 2019-12-17 12:05 ZJfor 阅读(499) 评论(0) 推荐(0) 编辑
摘要: httpClient作用:通过java代码模拟浏览器发起请求. 解决的问题:后台服务器之间的跨域问题. 1.快速案例: import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import 阅读全文
posted @ 2019-12-16 21:11 ZJfor 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 第一步:创建一个新的父工程father:file—–>new—->project ,注意要选maven,Create from archetype不要勾选。next填写GroupId 、ArtifactId、path 完成创建。 第二步:(jar工程)右键点击父工程father创建子工程,dao层s 阅读全文
posted @ 2019-12-14 15:40 ZJfor 阅读(1616) 评论(0) 推荐(0) 编辑
摘要: IDEA无法识别一个类类,将其显示为红色,如果 compile 没有问题。鼠标放上去后显示 “Cannot resolve symbol XXX”,有两种解决方式: (1)点击菜单中的 “File” -> “Invalidate Caches / Restart”→ “Invalidate and 阅读全文
posted @ 2019-12-14 09:46 ZJfor 阅读(2964) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-12-13 18:21 ZJfor 阅读(1853) 评论(0) 推荐(0) 编辑
摘要: 禁用方案: 浏览器输入:chrome://net-internals/#hsts 2.输入域名 点击delete 清空缓存 重启谷歌浏览器即可. 阅读全文
posted @ 2019-12-13 18:07 ZJfor 阅读(644) 评论(0) 推荐(0) 编辑
摘要: SessionDAO是Shiro提供的一个数据交互层的interface接口,其作用是可以将Session写入到数据库中,然后可以对Session进行增删改查操作。 阅读全文
posted @ 2019-12-11 20:19 ZJfor 阅读(105) 评论(0) 推荐(0) 编辑