# reduce **Repository Path**: ziiwee/reduce ## Basic Information - **Project Name**: reduce - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-04 - **Last Updated**: 2022-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Reduce 快速开发库 ## 快速使用 ### 安装 ```shell # 拉取仓库到本地 git clone https://gitee.com/ziiwee/reduce.git cd reduce # 安装项目到本地maven仓库 mvn install ``` ### 引入(Maven) ```xml com.ziiwee.reduce reduce-spring-boot-starter ${reduce.version} ``` 请使用 `pom.xml` 文件中的版本号 ### 使用 写一个 Entity ,便会自动生成相应的接口与接口文档: ```java @Export //为该资源提供 REST 接口,并提供接口文档 @Label("猫") //接口文档中的中文描述 @Data @Entity public class Cat extends IntEntity { @Label("名字") @NotBlank //接口文档 支持 JSR303 注解 private String name; @Label("年龄") @Min(1) @Max(30) @NotNull private Integer age; @Label("类型") @NotNull private Type type; public enum Type { @Label("狸花") LIHUA, @Label("橘猫") JUMAO, @Label("其他") OTHER, ; } } ``` 然后运行你的项目,便可以访问到接口文档页面: ```shell curl http://localhost:8080/ ```