会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
挑战者V
新博客地址:https://youcongtech.com,希望我的博客能够给大家带来帮助。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
95
下一页
2020年11月22日
Java之定时任务全家桶
摘要: 定时任务应用非常广泛,Java提供的现有解决方案有很多。本次主要讲schedule、quartz、xxl-job、shedlock等相关的代码实践。 一、SpringBoot使用Schedule 核心代码: @Component public class ScheduleTask { private
阅读全文
posted @ 2020-11-22 13:18 挑战者V
阅读(845)
评论(0)
推荐(0)
2020年11月21日
Webservice如何通过代码单元测试
摘要: 前面我在下面这篇文章说过如何使用WebService:SpringBoot整合Apache-CXF实践 在这篇文章中我列举过通过SOAP UI测试webservice接口。 但实际中涉及服务调用的情况,需要类似单元测试的东西。 一、基于代理类工厂 核心代码很简单,如下所示(这个比较普遍常用): tr
阅读全文
posted @ 2020-11-21 14:49 挑战者V
阅读(468)
评论(0)
推荐(0)
Java8 List通用方法处理总结
摘要: 总结项目里使用Java8新特性对List的数据处理(用的比较多的)。 一、分组 Map<String, List<T>> yearData = allData.stream().collect(Collectors.groupingBy(T::getYear)); 二、条件筛选 单条件筛选 List
阅读全文
posted @ 2020-11-21 14:47 挑战者V
阅读(1036)
评论(0)
推荐(0)
Java之下载网络图片到本地文件夹
摘要: 核心代码(下载网络图片到本地文件夹): public class DownFileUtils { public static void downloadFile(String remoteFilePath, String localFilePath) { URL urlfile = null; Ht
阅读全文
posted @ 2020-11-21 14:46 挑战者V
阅读(1065)
评论(0)
推荐(0)
Hutool之Http工具类使用
摘要: 最早接触Hutool这个集常用工具类为一体的框架工具包是在2018年的时候(酒店业务需要调用第三方门锁API)。而后19年因为业务接触到Bmob云,开始写对Bmob云的API,于是便有了这篇文章Hutool工具类之HttpUtil使用Https 最近针对业务,再次用到这个。这次涉及到不同单个服务之间
阅读全文
posted @ 2020-11-21 14:45 挑战者V
阅读(19911)
评论(0)
推荐(1)
2020年11月7日
SpringCloud之Sentinel
摘要: 一、Sentinel Sentinel GitHub地址:https://github.com/alibaba/Sentinel 关于Sentinel详细介绍:https://github.com/alibaba/Sentinel/wiki/%E4%BB%8B%E7%BB%8D Sentinel官方
阅读全文
posted @ 2020-11-07 17:05 挑战者V
阅读(984)
评论(0)
推荐(0)
SpringCloud之Gateway
摘要: 一、为什么选择SpringCloud Gateway而不是Zuul? Gateway和Zuul的职责一样,都承担着请求分发,类似Nginx分发到后端服务器。 1.SpingCloud Gateway 和SpringCloud Zuul对比分析 (1)相同点 底层都是servlet 两者均是web网关
阅读全文
posted @ 2020-11-07 17:02 挑战者V
阅读(709)
评论(0)
推荐(0)
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
摘要: 1.错误信息 com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server 2.错误背景 启动Eureka Server报错 3.错误原因 Spring2.0
阅读全文
posted @ 2020-11-07 17:00 挑战者V
阅读(1055)
评论(0)
推荐(0)
2020年11月6日
SpringCloud之分布式链路追踪
摘要: 一、为什么要有分布式链路追踪 链路追踪的主要目的在于让我们知道A微服务调用B微服务,B微服务调用C微服务,C微服务调用D微服务,D微服务调用A微服务等整个流程是怎样的。 二、SpringCloud整合Sleuth+Zipkin 1.Maven依赖 <!-- SpringCloud Sleuth --
阅读全文
posted @ 2020-11-06 23:25 挑战者V
阅读(644)
评论(0)
推荐(0)
Jar指定运行main方法
摘要: 最近在试验某个功能遇到这样的需求,并不需要项目一直运行,这是在某个特定的时候运行即可,而且只运行main方法里面的应用程序。这里我没有用grandle,用的是Maven,主要在pom.xml配置如下内容即可: <build> <plugins> <plugin> <groupId>org.apach
阅读全文
posted @ 2020-11-06 23:23 挑战者V
阅读(1066)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
···
95
下一页
公告