# agile-abstract-business-demo **Repository Path**: agile-framework/agile-abstract-business-demo ## Basic Information - **Project Name**: agile-abstract-business-demo - **Description**: agile-abstract-business样例工程 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-23 - **Last Updated**: 2022-06-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # agile-abstract-business-demo #### 介绍 agile-abstract-business样例工程 #### 安装教程 1. idea通过git拉取代码 2. 刷新maven #### 使用说明 1. 修改application.yml设置数据库连接信息 2. 直接以springboot工程模式部署,以`com.demo.App`作为入口 3. 工程会检测到样例表sys_api,并自动创建该表 #### 测试restful_api 工程会为任何自定义的JPA风格POJO生成增删改查、分页模糊查询等功能映射,以样例SysApiDo为例: 工程中的`Demo.postman_collection.json`为postman接口文件,可以直接导入到postman中进行测试体验 | 功能 | 地址 | 参数 | | ---- | ----------- | ---- | | 新增一条数据 | `POST`:`http://localhost:8080/api/SysApiDo/default` |`{"sysApiId":1,"businessCode":"1code","businessName":"1name","name":"测试用的1"}`| | 全表查询 | `GET`:`http://localhost:8080/api/SysApiDo/default` |无| | 根据主键查询 | `GET`:`http://localhost:8080/api/SysApiDo/default/1` |路径方式传参,最后的`1`为数据主键| | 全表模糊查询,name为测试用的1的数据 | `GET`:`http://localhost:8080/api/SysApiDo/default/1` |`{"name":"测试用的1"}`| | 分页,第一页每页10条数据 | `GET`:`http://localhost:8080/api/SysApiDo/default/page/1/10` || | 更新 | `PUT`:`http://localhost:8080/api/SysApiDo/default` |`{"sysApiId":1,"businessCode":"1code","businessName":"1name","name":"测试用的1"}`| | 根据主键删除 | `DELETE`:`http://localhost:8080/api/SysApiDo/default/1` |路径方式传参,最后的`1`为数据主键| | 根据主键批量删除,删除1、2数据为例 | `DELETE`:`http://localhost:8080/api/SysApiDo/default` |`{"id":["1","2"]}`| | 更多 |更多API可通过扩展BaseService类进行扩展,可通过制定前后端传参规则,完成单表的任何操作,还包括分场景参数验证等能力,排序能力等等,后续慢慢发布 ||