# apijson-spring-boot **Repository Path**: yunjiao-source/apijson-spring-boot ## Basic Information - **Project Name**: apijson-spring-boot - **Description**: Spring Boot for APIJSON - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2025-07-27 - **Last Updated**: 2025-07-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: SpringBoot, APIJSON ## README # Spring Boot for [APIJSON](https://gitee.com/Tencent/APIJSON/) ## 项目列表 | 项目 | 说明 | |-----------------------------------|-------------------------| | apijson-spring-boot-autoconfigure | 自动配置 | | apijson-spring-boot-dependencies | 项目依赖 | | apijson-spring-boot-examples | 示例项目 | | apijson-spring-boot-starter | APIJSON Spring Boot 启动器 | ## 使用 Gradle ```gradle dependencies { compile "io.gitee.yunjiao-source:apijson-spring-boot-starter:$version" } ``` ## 使用 Maven ```xml io.gitee.yunjiao-source apijson-spring-boot-starter ${version} ``` 详细信息参考`apijson-spring-boot-examples`项目 ## 所有的配置属性 参考[application-all.yaml](./apijson-spring-boot-examples/apijson-spring-boot-example-common/src/main/resources/application-all.yml) ## 支持的接口 | 接口url | 方法 | 说明 | |-----------------------|------|--------------------------------------------------| | common/{method} | POST | 支持GET,HEAD,GETS,HEADS,POST,PUT,DELETE,CRUD等 | | common/{method}/{tag} | POST | 增删改查统一接口,这个一个接口可替代 7 个万能通用接口,牺牲一些路由解析性能来提升一点开发效率 | | ext/reload | POST | 重新加载配置 | | ext/post/verify | POST | 生成验证码 | | ext/gets/verify | POST | 获取验证码 | | ext/heads/verify | POST | 校验验证码 | | ext/login | POST | 用户登录 | | ext/logout | POST | 退出登录,清空session | | ext/register | POST | 注册 | | ext/put/password | POST | 设置密码 | 请求示例 ```curl curl --location --request POST 'http://localhost:8080/api-json/common/get' \ --header 'Content-Type: application/json' \ --data-raw '{ "Moment": { "id": 12 } }' ``` * 默认是开启的,可以关闭这些接口,配置属性 `spring.apijson.rest-api.enable=false` * 接口添加了统一的前缀,默认是`api-json`,配置属性`spring.apijson.rest-api.prefix=YOURE-PREFIX` * 在`config/api`目录下有`apifox`及`postman`工具文件,导入json文件