Loading

龙行博客

使用Token机制,保证请求幂等

幂等有很多方案,但是个人觉得这个最好用,来一个示例方案先 我们使用Redis保存Token令牌,引入SpringBoot,Redis,ULID相关的依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <version>2.7.0</version> </depend...

收藏一波信创体系OA系统,可以的

它的官网: https://www.o2oa.net/ github: https://github.com/o2oa/o2oa?tab=readme-ov-file 收藏的目的,如有需要以后直接就能参考参考.

收藏一个Hyperf好用的ENUM

地址: https://github.com/lishuncoder/enums 没用过,但是收藏一波 提供两种枚举的应用,一种是对常规枚举类的加强和扩展,即枚举类扩展,继承原枚举类原生功能的基础上拓展了注解属性,出发点源自于一些枚举的值确实一致但意义却不一样的场景: tb_user.gender: 0 未知 1 男 2 女 tb_user.type: 0 普通 1 特殊类型1 2 特殊类型2 此时值确实一致,但需要的解释和描述却完全不一致,这是通过 const 常量的注解已经无法实现这个功能,或者只能将原 const 值 变为数组,这并不优雅,这时...

springboot3.0.7-redis配置记录下

配置redis一直报错,想都不用想肯定是版本原因,各种折腾终于解决 正确的配置能用版本, 记录下 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://mav...

一款好用的MQTT客户端工具收藏

官方网站 https://mqtt-explorer.com/ 收藏一波.免得下次找不到

SpringBoot注解验证的操作方法

一样的做个记录,每次找资料耗费时间 场景: 嗯! 就是. 对接收参数进行合规性校验 目前我知道的有两种方式 第一种 直接写在Controller的方法中 public HttpResult test(@NotNull(message = "缺少参数:id") Long id) 第二种: 写在实体类中 /** * @desc: 运单新增请求bean * @author: Lt * @date: 2024/3/25 17:17 */ @Setter @Getter @Accessors(chain = true) public...

SpringBoot捕获自定义message

做个记录吧,虽然到处都是 package com.driver.businessmodules.handler; import com.utils.businesscommonutils.HttpResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.MethodArgumentNotValidException; imp...

Win10任务栏不见了,被杀进程处理方法

win10不小心把任务栏进程kill了导致任务栏不见了 1.使用快捷键 ctrl+alt+del 点击 [任务管理器] 2.点击"文件"->"运行新任务"->输入"explorer" 3.点击确定.

SpringBoot+Netty TCP协议对接充电桩

只是记录下使用记录,fd和uid的绑定没有写 引入依赖 <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.22.Final</version> </dependency> 创建编码器,解码器 编码器 // 编码器 package com.example.springbootnettyserver...

maven阿里镜像配置

每次都要去找比较麻烦,挪过来自己看的😁 ▪apache mavne中央仓库 ▪https://search.maven.org/ ▪https://mvnrepository.com/ 方式一:全局配置 可以添加阿里云的镜像到maven的setting.xml配置中,这样就不需要每次在pom中,添加镜像仓库的配置,在mirrors节点下面添加子节点: <mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> &...