From aa13c12f6f83650082dc80c6c32433817049212d Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 11 Dec 2024 13:54:55 +0800 Subject: [PATCH] doc: update table.md --- docs/zh/core/table.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/zh/core/table.md b/docs/zh/core/table.md index 057eac32..659280cd 100644 --- a/docs/zh/core/table.md +++ b/docs/zh/core/table.md @@ -179,8 +179,9 @@ config.registerUpdateListener(updateListener, Entity1.class, Entity2.class); config.registerSetListener(setListener, Entity1.class, Entity2.class); ``` -## 案例 -### 案例 1:设置创建和更新者的用户名 +## 示例 +### 场景 1:设置创建和更新者的用户名 + 需要自建一个**BaseEntity**,前提是涉及到的类需要继承BaseEntity ```java @@ -210,7 +211,8 @@ public class MybatisInsertListener implements InsertListener { ``` -配置 +启动配置 + ```java @Configuration public class MyBatisFlexConfiguration { @@ -224,8 +226,6 @@ public class MyBatisFlexConfiguration { //设置BaseEntity类启用 config.registerInsertListener(mybatisInsertListener, BaseEntity.class); config.registerUpdateListener(mybatisUpdateListener, BaseEntity.class); - - ); } } ```