{"id":21803177,"url":"https://github.com/litongjava/http-echo-json","last_synced_at":"2026-04-15T08:36:46.168Z","repository":{"id":184979924,"uuid":"614142738","full_name":"litongjava/http-echo-json","owner":"litongjava","description":"基于jfinal开发,返回一些常见的json数据,为其它端提供测试数据","archived":false,"fork":false,"pushed_at":"2023-07-31T07:17:16.000Z","size":1297,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T04:09:52.102Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/litongjava.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}},"created_at":"2023-03-15T01:23:17.000Z","updated_at":"2023-03-15T01:24:14.000Z","dependencies_parsed_at":"2023-07-31T08:39:12.274Z","dependency_job_id":null,"html_url":"https://github.com/litongjava/http-echo-json","commit_stats":null,"previous_names":["litongjava/http-echo-json"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litongjava%2Fhttp-echo-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litongjava%2Fhttp-echo-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litongjava%2Fhttp-echo-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litongjava%2Fhttp-echo-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litongjava","download_url":"https://codeload.github.com/litongjava/http-echo-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244752362,"owners_count":20504256,"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":[],"created_at":"2024-11-27T11:40:02.273Z","updated_at":"2026-04-15T08:36:41.143Z","avatar_url":"https://github.com/litongjava.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### http-echo-json\n\n#### 简介\n\n基于jfinal开发,返回一些常见的json数据,为其它端提供测试数据\n\napi.flickr.com 是一个被墙网站,在国内搭建一个,提供必要的json服务\n\n\n#### 接口文档\n使用ApiFox  \nhttps://www.apifox.cn/apidoc/shared-2daf86e0-de95-4ffb-891d-85be0d756d6c\n\n#### 启动项目\n使用mvn和spring-boot插件启动即可\n```\nmvn clean package -DskipTests spring-boot:run\n```\n### 部署到阿里云函数计算\n\n#### 创建web应用\n\n访问https://fc.console.aliyun.com/fc/overview/cn-hangzhou\n\n![](media/156d7e041d967333169473ec36eb17f7.png)\n\n上传代码时选择代码文件夹\n\n监听端口设置为实际的服务启动端口\n\n启动命令\n\njava -Xverify:none -cp config:lib/\\*:static\ncom.litongjava.http.echo.json.BootApplication\n\n![](media/eb02ed2b0c4d96c865b3c4e987222322.png)\n\n![](media/89192d183bc764a66415a53de73fd23c.png)\n\n#### 查看域名并测试\n\n##### 查看域名\n\n![](media/0c561b42ebf30f1fec69edcf1728e918.png)\n\n##### 测试\n\n![](media/2a9c25786abf48922914f4425414008e.png)\n\n访问的域名是http://60418942-1709155087484149.test.functioncompute.com/\n\n![](media/9ce092fece2946e0cb21f4628c65a992.png)\n\n#### 服务及函数\n\n部署成功后再服务和函数中会生成2个服务\n\n| http-echo-json-02-QualifierHelper-ADF9AAF79E6C   |   |\n|--------------------------------------------------|---|\n| http-echo-json-02-http-echo-json-02-EFBED82B0BF1 |   |\n\n![](media/1327b1040f196172e84fb6dfa02fa2be.png)\n\n#### 查看源文件\n\n服务及函数--\\\u003e函数名--\\\u003e代码执行\n\n![](media/951245cb63749112a9e944d12dc1b682.png)\n\nbootstrap\n```\n#!/usr/bin/env bash\n./socat.sh \u0026\njava -Xverify:none -cp config:lib/*:static com.litongjava.http.echo.json.BootApplication\n```\n\nsocat.sh\n```\n#!/usr/bin/env bash\nwhile ! \u0026\u003e/dev/null \u003c/dev/tcp/127.0.0.1/8000; do\n    sleep 0.01;\ndone\nsocat TCP4-LISTEN:9000,reuseaddr,fork TCP4:127.0.0.1:8000\n```\n\n\n猜测socat文件应该没有什么用\n\ntemplate.yml\n```\nROSTemplateFormatVersion: '2015-09-01'\nTransform: 'Aliyun::Serverless-2018-04-03'\nResources:\n  demo:\n    Type: 'Aliyun::Serverless::Service'\n    Properties:\n      Description: This is demo service\n      NasConfig: Auto\n    func:\n      Type: 'Aliyun::Serverless::Function'\n      Properties:\n        Handler: index.handler\n        Runtime: custom\n        CodeUri: ./\n```\n\n\n\n#### 查看域名\n\n点击自定义域名--\\\u003e查看到自定义域名的配置如下\n\n![](media/b4643666fbc0cbdaecd0437ffcdea39f.png)\n\n| 路径 | 服务名称                                         | 函数名称          | 版本/别名         |\n|------|--------------------------------------------------|-------------------|-------------------|\n| /\\*  | http-echo-json-02-http-echo-json-02-EFBED82B0BF1 | http-echo-json-02 | http-echo-json-02 |\n\n为什么会有两个域名\n\n| http://60418942-1709155087484149.test.functioncompute.com/ | 成功 |\n|------------------------------------------------------------|------|\n| http://1709155087484149.cn-hangzhou.fc.aliyuncs.com/       | 失败 |\n\n#### 自定义域名\n\n设置一个cname解析\n\n| http-echo-json.demo.ping0.top | 1709155087484149.cn-hangzhou.fc.aliyuncs.com |\n|-------------------------------|----------------------------------------------|\n\n![](media/c2344961c435d5c5c93d346b1696d3de.png)\n\n在函数计算中添加自定义域名\n\n![](media/815ae347dd6ae72ce9ad5fc1da9c0dda.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitongjava%2Fhttp-echo-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitongjava%2Fhttp-echo-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitongjava%2Fhttp-echo-json/lists"}