上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页

2019年10月25日

Spring Boot 注入外部配置到应用内部

摘要: Spring Boot允许你外部化你的配置,这样你就可以在不同的环境中使用相同的应用程序代码,你可以使用properties文件、YAML文件、环境变量和命令行参数来外部化配置,属性值可以通过使用@Value注解直接注入到你的bean中,通过Spring的Environment抽象访问,或者通过@C 阅读全文

posted @ 2019-10-25 11:00 cag2050 阅读(235) 评论(0) 推荐(0) 编辑

2019年10月24日

HashMap、HashTable 区别

摘要: 区别项 | HashMap | HashTable | | 继承和实现 | | 线程安全 | 不是线程安全的 | 是线程安全的 key、value是否可以为null | key、value都可以为null | key、value都不可以为null 支持的遍历种类 | 只支持Iterator(迭代器) 阅读全文

posted @ 2019-10-24 17:49 cag2050 阅读(124) 评论(0) 推荐(0) 编辑

throw new RuntimeException(e) 与 e.printStackTrace( ) 的区别

摘要: 出处:https://blog.csdn.net/xuzhuaaron1/article/details/73611404 阅读全文

posted @ 2019-10-24 16:45 cag2050 阅读(530) 评论(0) 推荐(0) 编辑

2019年10月22日

Feign 报错:No fallback instance of type class xxx found for feign client xxx

摘要: 通常需要确认配置内容: 1. 开启 Hystrix: 2. Fallback类需要注解 出处:https://www.jianshu.com/p/c8210d878e96 阅读全文

posted @ 2019-10-22 14:43 cag2050 阅读(7854) 评论(0) 推荐(0) 编辑

2019年10月21日

Spring Cloud Turbine 知识点

摘要: Turbine 默认使用 Eureka 作为注册中心;如果使用 Consul 作为注册中心,需要排除掉 Eureka;pom.xml 如下: 出处:https://www.jianshu.com/p/6ca2b31798cf 阅读全文

posted @ 2019-10-21 17:48 cag2050 阅读(155) 评论(0) 推荐(0) 编辑

2019年10月16日

微信小程序 学习资料

摘要: 学习资料 | 网址 | 下载微信小程序开发工具 | https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html 注册 | https://mp.weixin.qq.com/wxopen/waregister?acti 阅读全文

posted @ 2019-10-16 14:06 cag2050 阅读(311) 评论(0) 推荐(0) 编辑

2019年10月15日

Consul 知识点

摘要: 平时开发时,一般使用consul dev模式,开发模式下kv存储不会持久化存储,全在内存中(重启consul就丢了!),所以一般建议yml配置文件内容,在项目中单独存一个文件,启动调试时,直接把配置文件内容贴到Value框里即可。 以上出处:https://www.cnblogs.com/duanx 阅读全文

posted @ 2019-10-15 17:32 cag2050 阅读(158) 评论(0) 推荐(0) 编辑

Consul 学习资料

摘要: 资料 | 网址 | Consul 入门指南 | https://book consul guide.vnzmi.com/ 阅读全文

posted @ 2019-10-15 17:29 cag2050 阅读(188) 评论(0) 推荐(0) 编辑

2019年10月14日

Logstash 学习资料

摘要: 学习资料 | 网址 | Logstash Reference(官方) | https://www.elastic.co/guide/en/logstash/current/introduction.html 阅读全文

posted @ 2019-10-14 19:33 cag2050 阅读(130) 评论(0) 推荐(0) 编辑

Kibana 学习资料

摘要: Kibana 学习资料 | 网址 | Kibana 官方文档 | https://s0www0elastic0co.icopy.site/guide/en/kibana/current/introduction.html Kibana 用户手册(官方,中文)| https://www.elastic 阅读全文

posted @ 2019-10-14 18:00 cag2050 阅读(231) 评论(0) 推荐(0) 编辑

Elasticsearch 报错及解决

摘要: 报错: Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load fielddata in memory by uninverting t 阅读全文

posted @ 2019-10-14 17:19 cag2050 阅读(1730) 评论(0) 推荐(0) 编辑

Eslint 允许使用双等号

摘要: 资料 | 网址 | ESlint: Expected !== and instead saw != | https://stackoverflow.com/questions/48375316/eslint expected and instead saw?answertab=votes tab t 阅读全文

posted @ 2019-10-14 13:02 cag2050 阅读(4815) 评论(0) 推荐(0) 编辑

2019年10月13日

Kibana 的 docker 镜像使用

摘要: 1.dockhub镜像网址:https://hub.docker.com/_/kibana 2.下载镜像: 3.创建容器(Kibana 默认的端口为5601): 4.本地访问: 阅读全文

posted @ 2019-10-13 16:45 cag2050 阅读(1713) 评论(0) 推荐(0) 编辑

Zipkin 知识点

摘要: 在Spring Cloud D版本,zipkin server通过引入依赖的方式构建工程,自从E版本之后,这一方式改变了,采用官方的jar形式启动。 出处:https://juejin.im/post/5c623c195188256219175369 heading 5 阅读全文

posted @ 2019-10-13 12:06 cag2050 阅读(138) 评论(0) 推荐(0) 编辑

2019年10月12日

Zipkin 的 Docker 镜像使用

摘要: 1.Zipkin 在 dockerhub 上网址:https://hub.docker.com/r/openzipkin/zipkin 2.下载镜像 3.创建容器 4.在浏览器上访问Web界面 阅读全文

posted @ 2019-10-12 19:39 cag2050 阅读(3302) 评论(0) 推荐(0) 编辑

HTTP请求中的Form Data与Request Payload的区别

摘要: 出处:https://github.com/kaola fed/blog/issues/105 阅读全文

posted @ 2019-10-12 10:30 cag2050 阅读(133) 评论(0) 推荐(0) 编辑

2019年10月11日

Spring Cloud Sleuth 知识点

摘要: Spring应用在监测到Java依赖包中有sleuth和zipkin后,会自动在RestTemplate的调用过程中向HTTP请求注入追踪信息,并向Zipkin Server发送这些信息。 出处:http://www.ityouknow.com/springcloud/2018/02/02/spri 阅读全文

posted @ 2019-10-11 19:19 cag2050 阅读(209) 评论(0) 推荐(0) 编辑

2019年10月9日

Spring Cloud Task 知识点

摘要: Spring Cloud Task的目标是为Spring Boot应用程序提供创建短期运行微服务的功能。 出处:https://blog.csdn.net/peterwanghao/article/details/83033485 阅读全文

posted @ 2019-10-09 12:00 cag2050 阅读(2048) 评论(0) 推荐(0) 编辑

Spring Boot 2实现分布式锁——这才是实现分布式锁的正确姿势!

摘要: 参考资料 | 网址 | Spring Boot 2实现分布式锁——这才是实现分布式锁的正确姿势!| http://www.spring4all.com/article/6892 阅读全文

posted @ 2019-10-09 11:02 cag2050 阅读(226) 评论(0) 推荐(0) 编辑

2019年9月30日

Spring Cloud Stream 知识点

摘要: 发布 订阅模式 在Spring Cloud Stream中的消息通信方式遵循了发布 订阅模式,当一条消息被投递到消息中间件之后,它会通过共享的Topic主题进行广播,消息消费者在订阅的主题中收到它并触发自身的业务逻辑处理。这里所提到的Topic主题是Spring Cloud Stream中的一个抽象 阅读全文

posted @ 2019-09-30 16:42 cag2050 阅读(226) 评论(0) 推荐(0) 编辑

2019年9月29日

Spring Boot 与 Spring Cloud 的版本对应

摘要: 事项 | 列表 | spring官方对应查看网址 | https://start.spring.io/actuator/info spring cloud dependencies 版本列表 | https://mvnrepository.com/artifact/org.springframewo 阅读全文

posted @ 2019-09-29 10:20 cag2050 阅读(345) 评论(0) 推荐(0) 编辑

2019年9月27日

Spring Cloud Consul Config 知识点

摘要: Spring Cloud Consul Config 是 Config Server 和 Client的替代方案。 搭建一个配置中心,可以选择的方案: Spring Cloud Config 或者 Spring Cloud Consul Config Spring cloud config优点很明显 阅读全文

posted @ 2019-09-27 19:49 cag2050 阅读(324) 评论(0) 推荐(0) 编辑

2019年9月25日

RabbitMQ 的 docker 镜像使用

摘要: RabbitMQ 的 docker 镜像使用 1.下载镜像(management版本的才带有web管理界面) 2.创建容器(监听端口:5672,web管理界面端口:15672) 3.使用默认用户名、密码:guest/guest 登陆 RabbitMQ 启动相关提示信息 Dockerhub 地址:ht 阅读全文

posted @ 2019-09-25 16:11 cag2050 阅读(1627) 评论(0) 推荐(0) 编辑

2019年9月20日

Spring Cloud Config 知识点

摘要: Spring Cloud Config项目是一个解决分布式系统的配置管理方案。它包含了Client和Server两个部分,server提供配置文件的存储、以接口的形式将配置文件的内容提供出去,client通过接口获取数据、并依据此数据初始化自己的应用。Spring cloud使用git或svn存放配 阅读全文

posted @ 2019-09-20 19:46 cag2050 阅读(149) 评论(0) 推荐(0) 编辑

2019年9月19日

漫画:什么是服务熔断?

摘要: 这里需要解释两点: 1. 开启熔断 在固定时间窗口内,接口调用超时比率达到一个阈值,会开启熔断。进入熔断状态后,后续对该服务接口的调用不再经过网络,直接执行本地的默认方法,达到服务降级的效果。 2. 熔断恢复 熔断不可能是永久的。当经过了规定时间之后,服务将从熔断状态回复过来,再次接受调用方的远程调 阅读全文

posted @ 2019-09-19 20:31 cag2050 阅读(332) 评论(0) 推荐(0) 编辑

Flux 和 Mono 的区别

摘要: Flux 和 Mono 是 Reactor 中的两个基本概念。Flux 表示的是包含 0 到 N 个元素的异步序列。在该序列中可以包含三种不同类型的消息通知:正常的包含元素的消息、序列结束的消息和序列出错的消息。当消息通知产生时,订阅者中对应的方法 onNext(), onComplete()和 o 阅读全文

posted @ 2019-09-19 20:11 cag2050 阅读(7640) 评论(0) 推荐(1) 编辑

同时引入依赖:spring-cloud-starter-gateway 和 spring-boot-starter-web,报错

摘要: 报错: 原因:Gateway 已包含web模块。 解决:去掉 pom.xml 中的 spring boot starter web 部分。 阅读全文

posted @ 2019-09-19 11:30 cag2050 阅读(10041) 评论(0) 推荐(0) 编辑

2019年9月18日

Feign 报错:The bean 'service-producer.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.

摘要: 报错: 解决:https://blog.csdn.net/u012211603/article/details/84312709 阅读全文

posted @ 2019-09-18 10:13 cag2050 阅读(7210) 评论(0) 推荐(0) 编辑

2019年9月16日

Feign和OpenFeign的区别

摘要: 出处:http://www.gogoomo.com/2018/10/30/feign client/ 阅读全文

posted @ 2019-09-16 19:54 cag2050 阅读(5598) 评论(0) 推荐(0) 编辑

Maven 报错:Compilation of Maven projects is supported only if external build is started from an IDE.

摘要: 1. Maven 报错: Error:Maven Resources Compiler: Maven project configuration required for module 'yourProjectName' isn't available. Compilation of Maven p 阅读全文

posted @ 2019-09-16 15:24 cag2050 阅读(5791) 评论(0) 推荐(0) 编辑

2019年9月11日

使用 application.properties 中配置的属性,举例:@Value("${server.port}")

摘要: 使用 application.properties 中配置的属性:@Value 注解。 阅读全文

posted @ 2019-09-11 11:05 cag2050 阅读(2900) 评论(0) 推荐(0) 编辑

关于Spring中的参数校验的一点思考

摘要: 出处:https://mp.weixin.qq.com/s/uOUAmdeX88Cv0mXvBtQTnQ 阅读全文

posted @ 2019-09-11 10:20 cag2050 阅读(209) 评论(0) 推荐(0) 编辑

2019年9月9日

Spring Cloud 之 Gateway 知识点:网关

摘要: Spring Cloud Gateway 是使用 netty+webflux 实现因此不需要再引入 web 模块。 Spring Cloud Gateway 提供了一种默认转发的能力,只要将 Spring Cloud Gateway 注册到服务中心,Spring Cloud Gateway 默认就会 阅读全文

posted @ 2019-09-09 17:30 cag2050 阅读(504) 评论(0) 推荐(0) 编辑

2019年9月6日

Consul 的 Docker 镜像使用

摘要: 1.镜像官方网址:https://hub.docker.com/_/consul 2.pull 镜像: 3.创建容器(默认http管理端口:8500) 4.访问管理网址 阅读全文

posted @ 2019-09-06 10:12 cag2050 阅读(2159) 评论(0) 推荐(0) 编辑

2019年9月5日

Spring Cloud 之 Consul 知识点:服务注册与发现(类似工具:Eureka、ZooKeeper、Etcd)

摘要: 资料 | 网址 | springcloud(十三):注册中心 Consul 使用详解 | http://ityouknow.com/springcloud/2018/07/20/spring cloud consul.html 管理网页 | 网址 | 管理后台 | http://localhost: 阅读全文

posted @ 2019-09-05 19:43 cag2050 阅读(376) 评论(0) 推荐(0) 编辑

2019年9月3日

Elasticsearch 待办

摘要: 1. 日期格式:yyyy MM dd,改为 yyyy MM dd HH:mm:ss.SSS;实体类路径:https://github.com/cag2050/spring_boot_elasticsearch_demo/blob/master/src/main/java/com/cag2050/sp 阅读全文

posted @ 2019-09-03 13:15 cag2050 阅读(135) 评论(0) 推荐(0) 编辑

Elasticsearch Date类型,时间存储相关说明

摘要: 资料 | 网址 | Elasticsearch 插入时间字段时数据格式问题 | https://segmentfault.com/a/1190000016296983 Elasticsearch Date类型,时间存储相关说明。 | https://www.sojson.com/blog/149.h 阅读全文

posted @ 2019-09-03 10:58 cag2050 阅读(1394) 评论(0) 推荐(0) 编辑

Elasticsearch 日期类型的自动监测,官方文档

摘要: 资料 | 网址 | Elasticsearch Reference [7.3] » Mapping » Field datatypes » Date datatype | https://www.elastic.co/guide/en/elasticsearch/reference/current/ 阅读全文

posted @ 2019-09-03 10:30 cag2050 阅读(403) 评论(0) 推荐(0) 编辑

Elasticsearch 中的 ignore_above

摘要: 检索超过ignore_above设定长度的字段后,无法返回结果 阅读全文

posted @ 2019-09-03 10:15 cag2050 阅读(1756) 评论(0) 推荐(0) 编辑

2019年9月2日

JPA 报错:Page 2 of 1 containing UNKNOWN instances

摘要: JPA 中,page是从0开始,不是从1开始; 因此,将用户输入的从1开始的page页码减1; 参见: "spring_boot_elasticsearch_demo/controller/BlogController.java" 阅读全文

posted @ 2019-09-02 19:35 cag2050 阅读(5631) 评论(1) 推荐(3) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页

导航