From 4b1e4fa0215149f50327bb4ce612cdfa198c9aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=AD=A3=E4=BC=9F?= <14040017+java-coding@user.noreply.gitee.com> Date: Tue, 29 Jul 2025 07:36:15 +0000 Subject: [PATCH] update docs/zh/core/id.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周正伟 <14040017+java-coding@user.noreply.gitee.com> --- docs/zh/core/id.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/zh/core/id.md b/docs/zh/core/id.md index 30316daf..be0c1743 100644 --- a/docs/zh/core/id.md +++ b/docs/zh/core/id.md @@ -132,7 +132,9 @@ public class UUIDKeyGenerator implements IKeyGenerator { 第 2 步:注册 UUIDKeyGenerator ```java -KeyGeneratorFactory.register("myUUID", new UUIDKeyGenerator()); +static { + KeyGeneratorFactory.register("myUUID", new UUIDKeyGenerator()); +} ``` 第 3 步:在 Entity 里使用 "myUUID" 生成器: