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配置文件实现 ### Ⅳ. 用途