Files
biji/biji-houdaun/src/main/java/com/test/bijihoudaun/util/UuidV7.java
ikmkj 1ef2e116a6 feat(biji-houdaun): 实现用户注册、登录、 Markdown 文件和图片上传功能
- 新增用户注册、登录接口及服务实现
- 添加 Markdown 文件创建、更新接口及服务实现
- 实现图片上传、获取接口及服务实现
- 集成 Snowflake ID 生成器
- 添加全局异常处理和统一返回结果封装
- 配置跨域访问和静态资源处理
- 实现基础的 XSS 防护
2025-06-16 20:20:08 +08:00

27 lines
531 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.test.bijihoudaun.util;
import com.fasterxml.uuid.Generators;
import com.fasterxml.uuid.impl.TimeBasedGenerator;
/**
* uuidV7
*/
public class UuidV7 {
/**
* 生成uuidV7生成的uuid有-
*/
public static String uuid() {
TimeBasedGenerator generator = Generators.timeBasedGenerator();
return generator.generate().toString();
}
/**
* 获取uuidV7生成的uuid无-
*/
public static String uuidNoHyphen() {
return uuid().replace("-", "");
}
}