会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lshan
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
88
下一页
2024年8月26日
Python time时间格式化
摘要: 1、时间戳转换为指定格式日期 import time t = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) print(t) timestamp = time.time() tuple_time = time.localtime(times
阅读全文
posted @ 2024-08-26 10:58 lshan
阅读(69)
评论(0)
推荐(0)
2024年8月21日
ThreadLocal ThreadLocalUtil
摘要: ThreadLocalUtil.java public class ThreadLocalUtil { static final ThreadLocal THREAD_LOCAL = new ThreadLocal(); public static <T> T get() { return (T)
阅读全文
posted @ 2024-08-21 10:09 lshan
阅读(76)
评论(0)
推荐(0)
2024年8月15日
JAVA8 stream 流 vs JDFrame (转)
摘要: 转自 : https://juejin.cn/post/7356652717392740404 个人开源框架矩阵百万级任务重试框架 Fast-Retrystream流太难用了看看JDFramespring-smart-di 动态切换实现类框架UniHttp 第三方接口对接框架 0、简介 由于经常记不
阅读全文
posted @ 2024-08-15 14:44 lshan
阅读(121)
评论(0)
推荐(0)
2024年8月8日
java 时间段划分 1.把一个时间段划分为 整天 和非整天的时间段 2. 把List<LocalDate> 按相邻的day , 划分为一个时间段,并且每个时间段 最大为3天
摘要: 时间段划分 0.已经时间段,需要知道这个时间段包含那些天 1.把一个时间段划分为 整天 和非整天的时间段 例如: "2024-07-11 08:30:00" ~ "2024-07-23 08:30:00"; 例如 完整的日期: 2024-07-12 2024-07-13 2024-07-14 202
阅读全文
posted @ 2024-08-08 10:21 lshan
阅读(241)
评论(0)
推荐(0)
2024年7月29日
Springboot 解决mongodb transaction WriteConflict问题
摘要: 参考原文: https://segmentfault.com/a/1190000040457995?sort=newest 问题: 使用Mongodb的事务: pringframework.data.mongodb.UncategorizedMongoDbException: Command fai
阅读全文
posted @ 2024-07-29 17:59 lshan
阅读(281)
评论(0)
推荐(0)
2024年7月24日
python 异常优雅打印
摘要: 之前大多情况了下直接打印: print(f"Caught an exception: {e}") try: # 尝试执行的代码块 risky_operation() except SomeSpecificException as e: # 处理特定异常 print(f"Caught an excep
阅读全文
posted @ 2024-07-24 09:35 lshan
阅读(295)
评论(0)
推荐(0)
2024年7月22日
springboot 暴露多个自定义Header 避免前端无法获取
摘要: response.addHeader("Access-Control-Expose-Headers", "Your-Header-Name1, Your-Header-Name2, Your-Header-Name3");
阅读全文
posted @ 2024-07-22 16:47 lshan
阅读(57)
评论(0)
推荐(0)
2024年7月16日
spring gateway 2.5.10 修改请求body
该文被密码保护。
阅读全文
posted @ 2024-07-16 16:38 lshan
阅读(0)
评论(0)
推荐(0)
2024年7月9日
Vim复制文本到格式错乱的问题
摘要: paste 模式 运行如下命令,进入 paste 模式: :set paste 进入 paste 模式后,按 i 键进入插入模式,然后再粘帖,文本格式不会错乱了。但粘帖后还需要按 <ESC> 进入普通模式并执行如下命令结束 paste 模式: :set nopaste
阅读全文
posted @ 2024-07-09 10:25 lshan
阅读(200)
评论(0)
推荐(0)
Docker日志批量清理
摘要: 转发 :原文: https://blog.csdn.net/u013737132/article/details/134639909 常用: # 查找特定目录内的较大文件 find / -type f -size +500M 2>/dev/null sudo rm -rf /tmp/* # 占用空间
阅读全文
posted @ 2024-07-09 10:18 lshan
阅读(465)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
88
下一页