{"id":19765677,"url":"https://github.com/xuexiangjys/templateandserver","last_synced_at":"2025-04-30T15:30:39.667Z","repository":{"id":101672065,"uuid":"291503214","full_name":"xuexiangjys/TemplateAndServer","owner":"xuexiangjys","description":"简化版的Android服务端模板，用于接口模拟测试。","archived":false,"fork":false,"pushed_at":"2024-08-14T21:23:28.000Z","size":245,"stargazers_count":49,"open_issues_count":12,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-14T23:52:33.459Z","etag":null,"topics":["server","serverless-framework","template","x-templateproject"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"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/xuexiangjys.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-08-30T16:00:28.000Z","updated_at":"2024-06-01T22:54:17.000Z","dependencies_parsed_at":"2023-10-04T13:57:52.998Z","dependency_job_id":"2dacba0f-9a37-4d2a-9178-fa108fccfda9","html_url":"https://github.com/xuexiangjys/TemplateAndServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2FTemplateAndServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2FTemplateAndServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2FTemplateAndServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2FTemplateAndServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuexiangjys","download_url":"https://codeload.github.com/xuexiangjys/TemplateAndServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224214735,"owners_count":17274677,"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":["server","serverless-framework","template","x-templateproject"],"created_at":"2024-11-12T04:18:59.482Z","updated_at":"2024-11-12T04:18:59.955Z","avatar_url":"https://github.com/xuexiangjys.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TemplateAndServer\n\n简化版的Android服务端模版，用于接口模拟测试。\n\n## 关于我\n\n[![github](https://img.shields.io/badge/GitHub-xuexiangjys-blue.svg)](https://github.com/xuexiangjys)   [![csdn](https://img.shields.io/badge/CSDN-xuexiangjys-green.svg)](http://blog.csdn.net/xuexiangjys)   [![简书](https://img.shields.io/badge/简书-xuexiangjys-red.svg)](https://www.jianshu.com/u/6bf605575337)   [![掘金](https://img.shields.io/badge/掘金-xuexiangjys-brightgreen.svg)](https://juejin.im/user/598feef55188257d592e56ed)   [![知乎](https://img.shields.io/badge/知乎-xuexiangjys-violet.svg)](https://www.zhihu.com/people/xuexiangjys) \n\n## 演示（请star支持）\n\n### 服务端演示\n\n![](https://z3.ax1x.com/2021/06/15/2HmX0x.gif)\n\n### 浏览器演示\n\n![](https://z3.ax1x.com/2021/06/15/2Hmj76.gif)\n\n### 写法对比\n\n* AndServer\n\n![](https://z3.ax1x.com/2021/06/15/2HnC1H.png)\n\n![](https://z3.ax1x.com/2021/06/15/2HnPcd.png)\n\n* SpringBoot\n\n![](https://z3.ax1x.com/2021/06/15/2Hn99e.png)\n\n从上面的图片我们很容易看出，AndServer的写法和SpringBoot是非常相似的，就连项目工程的结构也是相似的。\n\n---\n\n## 功能介绍\n\n\u003e 本项目使用[AndServer](https://github.com/yanzhenjie/AndServer)提供的服务搭建。\n\n* 统一的请求日志记录。\n\n* 全局异常捕获处理，返回统一API结果。\n\n* 增加全局权限验证拦截器。\n\n* 文件上传。\n\n* 后台管理界面。\n\n* 接口测试界面。\n\n## 返回Json格式\n\n```\n{\n    \"code\":0, //响应码，0为成功，否则失败\n    \"msg\":\"\", //请求失败的原因说明\n    \"data\":{} //返回的数据对象\n}\n```\n\n## 使用方式\n\n### 服务器配置\n\n在`com.xuexiang.server.ServerConfig`进行配置的修改。\n\n### 服务接口编写\n\n1.在`com.xuexiang.server.controller`包下创建Controller类。\n\n2.在Controller类上加上`@RestController`和`@RequestMapping`注解。\n\n### 日志查看\n\n在logcat上搜索关键词\"AndServer\"即可查看请求日志。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuexiangjys%2Ftemplateandserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuexiangjys%2Ftemplateandserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuexiangjys%2Ftemplateandserver/lists"}