From 1a854993347d41dc2fad8980c58c2677b2e4c807 Mon Sep 17 00:00:00 2001 From: godotg Date: Fri, 8 Jul 2022 18:19:17 +0800 Subject: [PATCH] =?UTF-8?q?doc[storage]:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- storage/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/storage/README.md b/storage/README.md index 1b463fe6..8755a7b4 100644 --- a/storage/README.md +++ b/storage/README.md @@ -5,6 +5,8 @@ - 利用Java动态语言的反射特性,用最少的代码去解析Excel +- 支持Excel导出Json文件 + ### Ⅱ. 自动映射 - Excel的第一行对应Java类属性,第二行和第三行不会起到注释的作用,其中第一列必须是Id属性 @@ -16,7 +18,7 @@ ![Image text](../doc/image/storage/storage02.png) - 解析过后有两种使用方式 - 1. 通过注解 + 1. 通过注解 ``` @Component public class StudentManager { @@ -26,7 +28,7 @@ } ``` - 2. 通过类动态获取 + 2. 通过类动态获取 ``` Storage studentResources = (Storage) StorageContext.getStorageManager().getStorage(StudentResource.class); ``` @@ -45,10 +47,10 @@ var students = studentResources.getIndex("name", "james0"); - 唯一索引通过Storage.getUniqueIndex()获取,需要把索引注解标注为@Index(unique = true) -### Ⅲ. 热更新Excel +### Ⅲ. 热更新Excel/Json - [tank](https://github.com/zfoo-project/tank-game-server/blob/main/common/src/main/java/com/zfoo/tank/common/util/HotUtils.java) - 分布式热更新Excel配置文件实现 + 分布式热更新Excel/Json配置文件实现 ### Ⅳ. 用途