{"id":21525229,"url":"https://github.com/apijson/apijson-framework","last_synced_at":"2025-09-02T11:31:29.296Z","repository":{"id":37107788,"uuid":"245672077","full_name":"APIJSON/apijson-framework","owner":"APIJSON","description":"腾讯 APIJSON 服务端框架，通过数据库表配置角色权限、参数校验等，简化使用。Tencent APIJSON Server Framework for configuring access of roles and validation of arguments in database tables,  then using APIJSON easier.","archived":false,"fork":false,"pushed_at":"2024-06-30T15:50:16.000Z","size":5901,"stargazers_count":98,"open_issues_count":3,"forks_count":43,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-03T13:29:01.219Z","etag":null,"topics":["apiauto","apijson","tencent","unitauto"],"latest_commit_sha":null,"homepage":"https://github.com/Tencent/APIJSON","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/APIJSON.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-07T17:01:39.000Z","updated_at":"2024-06-30T15:48:10.000Z","dependencies_parsed_at":"2023-11-21T07:53:39.957Z","dependency_job_id":"25fb66bc-4a74-4939-8276-344836ccf662","html_url":"https://github.com/APIJSON/apijson-framework","commit_stats":null,"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APIJSON","download_url":"https://codeload.github.com/APIJSON/apijson-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231780351,"owners_count":18425544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apiauto","apijson","tencent","unitauto"],"created_at":"2024-11-24T01:33:48.452Z","updated_at":"2025-09-02T11:31:29.235Z","avatar_url":"https://github.com/APIJSON.png","language":"Java","readme":"# apijson-framework  [![](https://jitpack.io/v/APIJSON/apijson-framework.svg)](https://jitpack.io/#APIJSON/apijson-framework)\n腾讯 [APIJSON](https://github.com/Tencent/APIJSON) 服务端框架，通过数据库表配置角色权限、参数校验等，简化使用。\u003cbr /\u003e\nTencent [APIJSON](https://github.com/Tencent/APIJSON) Server Framework for configuring access of roles and validation of arguments in database tables,  then using APIJSON easier.\n\n#### Access: https://github.com/Tencent/APIJSON/blob/master/APIJSONORM/src/main/java/apijson/MethodAccess.java\n![image](https://user-images.githubusercontent.com/5738175/167259883-e5fff2f4-b3e8-4b2f-a597-d851004c3393.png)\n\n#### Request: https://github.com/Tencent/APIJSON/blob/master/APIJSONORM/src/main/java/apijson/orm/Operation.java\n![image](https://user-images.githubusercontent.com/5738175/167259922-f343683f-6335-4778-aaeb-d1b9aed999dc.png)\n\n\u003cbr /\u003e\n\n## 添加依赖\n## Add Dependency\n\n### Maven\n#### 1. 在 pom.xml 中添加 JitPack 仓库\n#### 1. Add the JitPack repository to pom.xml\n```xml\n\t\u003crepositories\u003e\n\t\t\u003crepository\u003e\n\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\u003c/repository\u003e\n\t\u003c/repositories\u003e\n```\n\n![image](https://user-images.githubusercontent.com/5738175/167261102-12f7f4d6-7895-4d79-a50e-076f93fca6d7.png)\n\n\u003cbr /\u003e\n\n#### 2. 在 pom.xml 中添加 apijson-framework 依赖\n#### 2. Add the apijson-framework dependency to pom.xml\n```xml\n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.APIJSON\u003c/groupId\u003e\n\t    \u003cartifactId\u003eapijson-framework\u003c/artifactId\u003e\n\t    \u003cversion\u003eLATEST\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n\n![image](https://user-images.githubusercontent.com/5738175/167261052-263ee9b4-aae5-4c51-b4d2-6a0446fc4152.png)\n\n\u003cbr /\u003e\n\nhttps://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo/pom.xml\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n### Gradle\n#### 1. 在项目根目录 build.gradle 中最后添加 JitPack 仓库\n#### 1. Add the JitPack repository in your root build.gradle at the end of repositories\n```gradle\n\tallprojects {\n\t\trepositories {\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\n\u003cbr /\u003e\n\n#### 2. 在项目某个 module 目录(例如 `app`) build.gradle 中添加 apijson-orm 依赖\n#### 2. Add the apijson-orm dependency in one of your modules(such as `app`)\n```gradle\n\tdependencies {\n\t        implementation 'com.github.APIJSON:apijson-framework:latest'\n\t}\n```\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## 初始化\n## Initialization\n#### 1.在你项目的主程序启动类 Application 的 static {} 代码块配置 APIJSONApplication.DEFAULT_APIJSON_CREATOR，至少重写 createSQLConfig\u003cT, M, L\u003e 方法返回你自己继承 APIJSONSQLConfig\u003cT, M, L\u003e 的子类\n#### 1.Configure APIJSONApplication.DEFAULT_APIJSON_CREATOR in static {} of your Application, at least override createSQLConfig\u003cT, M, L\u003e method and return your APIJSONSQLConfig\u003cT, M, L\u003e extends APIJSONSQLConfig.\n\n```java\n\tstatic {\n\t\tAPIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator\u003cLong, JSONObject, JSONArray\u003e() {\n\t\t\t@Override\n\t\t\tpublic DemoSQLConfig createSQLConfig() {\n\t\t\t\treturn new DemoSQLConfig();\n\t\t\t}\n\t\t};\n\t}\n```\n\n\u003cbr /\u003e\n\n#### 2.在你项目的主程序启动类 Application 的 main 方法里 SpringApplication.run 后调用 APIJSONApplication.init\n#### 2.Call APIJSONApplication.init after SpringApplication.run in main method of your Application\n\n```java\n\tpublic static void main(String[] args) throws Exception {\n\t\tSpringApplication.run(DemoApplication.class, args);\n\t\tAPIJSONApplication.init();\n\t}\n```\n\n\u003cbr /\u003e\n\n#### 见 [apijson.framework](/src/main/java/apijson/framework) 里各个类的注释及 [APIJSONDemo](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo) 里的 [DemoApplication](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java) \u003cbr /\u003e\n\n#### See document in [apijson.framework](/src/main/java/apijson/framework) classes and [DemoApplication](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java) in [APIJSONDemo](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo)\n\n![image](https://user-images.githubusercontent.com/5738175/167260539-27d7e13b-27b9-43ad-925e-3f79c99e8ac9.png)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## 使用\n## Usage\n\n#### Access: https://github.com/Tencent/APIJSON/blob/master/APIJSONORM/src/main/java/apijson/MethodAccess.java\n![image](https://user-images.githubusercontent.com/5738175/167259883-e5fff2f4-b3e8-4b2f-a597-d851004c3393.png)\n\n![image](https://user-images.githubusercontent.com/5738175/167261523-59abf4ba-e211-49f9-92bd-a79384bb757f.png)\n\n#### Request: https://github.com/Tencent/APIJSON/blob/master/APIJSONORM/src/main/java/apijson/orm/Operation.java\n![image](https://user-images.githubusercontent.com/5738175/167259922-f343683f-6335-4778-aaeb-d1b9aed999dc.png)\n\n![image](https://user-images.githubusercontent.com/5738175/167262762-2c2a1c58-e7bf-4352-a7b9-fcbb0fa67f7f.png)\n\n\u003cbr /\u003e\n有问题可以去 Tencent/APIJSON 提 issue \u003cbr /\u003e\nhttps://github.com/Tencent/APIJSON/issues/36\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n### 贡献者\n### Contributors\n1 个腾讯工程师、1 京东工程师 等，感谢大家的贡献~ \u003cbr /\u003e\n1 Tencent engineer, 1 JD engineer, etc. Thank you all~ \u003cbr /\u003e\nhttps://github.com/APIJSON/apijson-framework/graphs/contributors\n\n\u003cbr /\u003e\n\n#### 创作不易、坚持更难，点右上角 ⭐Star 支持一下，谢谢 ^_^\n#### Please ⭐Star this project ^_^\nhttps://github.com/APIJSON/apijson-framework\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapijson%2Fapijson-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapijson%2Fapijson-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapijson%2Fapijson-framework/lists"}