随笔 - 835  文章 - 1 评论 - 40 阅读 - 102万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

07 2024 档案
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 阅读(116) 评论(0) 推荐(0) 编辑
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 阅读(60) 评论(0) 推荐(0) 编辑
springboot 暴露多个自定义Header 避免前端无法获取
摘要:response.addHeader("Access-Control-Expose-Headers", "Your-Header-Name1, Your-Header-Name2, Your-Header-Name3"); 阅读全文
posted @ 2024-07-22 16:47 lshan 阅读(12) 评论(0) 推荐(0) 编辑
spring gateway 2.5.10 修改请求body
该文被密码保护。
posted @ 2024-07-16 16:38 lshan 阅读(0) 评论(0) 推荐(0) 编辑
Vim复制文本到格式错乱的问题
摘要:paste 模式 运行如下命令,进入 paste 模式: :set paste 进入 paste 模式后,按 i 键进入插入模式,然后再粘帖,文本格式不会错乱了。但粘帖后还需要按 <ESC> 进入普通模式并执行如下命令结束 paste 模式: :set nopaste 阅读全文
posted @ 2024-07-09 10:25 lshan 阅读(160) 评论(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 阅读(244) 评论(0) 推荐(0) 编辑
Ubuntu / Debian 进行缓存软件,加速 APT 下载 http_proxy
摘要:参烤:https://zhuanlan.zhihu.com/p/585124448 为 Ubuntu / Debian 进行缓存软件,加速 APT 下载 在不使用 APT Proxy 的时候,我们想要更新和安装软件(比如 vim),会使用下面的命令: apt-get update apt-get i 阅读全文
posted @ 2024-07-04 15:55 lshan 阅读(78) 评论(0) 推荐(0) 编辑
jenkins 安装以及迁移
摘要:前用之前的jenkins 拷贝之前的数据文件间到 /var/docker/jenkins/jenkins_home # 注意版本号 (或者 docker-ce 版本用最新) sudo docker run -itd --restart=unless-stopped -uroot -p 9999:80 阅读全文
posted @ 2024-07-04 11:43 lshan 阅读(17) 评论(0) 推荐(0) 编辑

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