随笔 - 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

08 2022 档案
Windows 安裝 macOS 10.15 Catalina(VM16)
摘要:原文:https://mrmad.com.tw/windows-vmware-player-macos-10-15-catalina 可参考:https://blog.csdn.net/qq_36969381/article/details/125588054 仅供学习使用 下載 macOS Cat 阅读全文
posted @ 2022-08-26 11:09 lshan 阅读(517) 评论(0) 推荐(0) 编辑
Spring Data JPA 使用 SQLite
摘要:Springboot+JPA+Sqlite整合demo参考: https://afu-bob.blog.csdn.net/article/details/90294553 简单使用: 1.依赖 <!-- https://mvnrepository.com/artifact/com.github.gw 阅读全文
posted @ 2022-08-24 11:44 lshan 阅读(949) 评论(0) 推荐(0) 编辑
ubuntu22.04 多个 python  版本切换
摘要:ubuntu22.04 默认python 是3.10 由于版本冲突,需要的python版本是3.7 1.安装python3.7 sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install py 阅读全文
posted @ 2022-08-12 13:57 lshan 阅读(9055) 评论(0) 推荐(1) 编辑
ubuntu 修改docker 源
摘要:在国内访问国外的Docker镜像源通常都是非常慢的,特别是最近GFW升级后,就变得更加慢了,因为要使用Docker中的镜像,这个时候最好就是将镜像指向国内的资源。 国内可用的几个镜像源: Docker 官方中国区:https://registry.docker-cn.com 网易:http://hu 阅读全文
posted @ 2022-08-12 11:27 lshan 阅读(3859) 评论(0) 推荐(0) 编辑
python 异步API 框架 FastAPI (类似flask-plus). 可以自动生成swagger 文档  (转)
摘要:原文:https://www.cnblogs.com/traditional/p/14733610.html#5089657 这次我们来聊一聊 FastAPI,它和我们之前介绍的 Sanic 是类似的,都是 Python 中的异步 web 框架。相比 Sanic,FastAPI 更加的成熟、社区也更 阅读全文
posted @ 2022-08-12 10:10 lshan 阅读(2825) 评论(0) 推荐(0) 编辑
python flask swagger 定义接口文档
摘要:像java 一样使用swagger UI 使用示例: #!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 8/10/22 3:10 PM # @Author : Sea # @File : bxBlogScripy.py # @mail: 阅读全文
posted @ 2022-08-11 10:18 lshan 阅读(785) 评论(0) 推荐(0) 编辑
MyWSClientUtils(java websocket client)
摘要:java 作为客户端 依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> import co 阅读全文
posted @ 2022-08-09 15:42 lshan 阅读(158) 评论(0) 推荐(0) 编辑
分布式幂等 2 (基于请求参数幂等)- 自定义接口幂等(注解) @AvoidResubmit(isLoc = false,interval=3000)
摘要:场景:用于接口请求参数幂等,基于请求参数判断在3s(interval)时间内是否重复提交,重复提交,则直接返回 {"code":2500,"message":"重复提交"} EVN : springboot 2.3.12 + jdk8 使用: 1.(在需要做类似幂等的接口加上注解)@AvoidRes 阅读全文
posted @ 2022-08-05 10:50 lshan 阅读(69) 评论(0) 推荐(0) 编辑
分布式幂等1(基于一次性token) - 自定义接口幂等(注解) @AvoidResubmit(isLoc = false)
摘要:/** * 目的: 自定义切片,防止表单重复提交, 尤其是服务间调用,retry,防止重复提交数据 * 1. 表单提交时 , 优先获取 一个token * 2. 提交表单时, 携带token 请求头 (header name: rdtc_token) * 3. 如果重复提交,响应: 重复提交 {"c 阅读全文
posted @ 2022-08-02 19:51 lshan 阅读(135) 评论(0) 推荐(0) 编辑
分布式事务( TCC) -- seata eurake springboot mysql (1.4.2)
摘要:项目搭建见: 分布式事务( XA) -- seata eurake springboot mysql (1.4.2) https://www.cnblogs.com/lshan/p/16533280.html 官网示例代码: https://github.com/seata/seata-sample 阅读全文
posted @ 2022-08-01 18:19 lshan 阅读(205) 评论(0) 推荐(0) 编辑
分布式锁-Redisson的使用
摘要:Redisson分布式锁的使用 1.依赖: <!-- 原生,本章使用--> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.13.6</version> </depen 阅读全文
posted @ 2022-08-01 09:51 lshan 阅读(1294) 评论(0) 推荐(0) 编辑

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