{"id":15001752,"url":"https://github.com/stonyshi/reactor-netty-ext","last_synced_at":"2026-03-03T14:35:36.547Z","repository":{"id":57723411,"uuid":"118595815","full_name":"StonyShi/reactor-netty-ext","owner":"StonyShi","description":"reactor-netty-ext","archived":false,"fork":false,"pushed_at":"2018-12-13T05:56:18.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T02:18:49.235Z","etag":null,"topics":["http-server","jersey","netty","reactor"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StonyShi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-23T10:37:26.000Z","updated_at":"2018-12-13T05:56:19.000Z","dependencies_parsed_at":"2022-08-25T12:51:27.690Z","dependency_job_id":null,"html_url":"https://github.com/StonyShi/reactor-netty-ext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StonyShi%2Freactor-netty-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StonyShi%2Freactor-netty-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StonyShi%2Freactor-netty-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StonyShi%2Freactor-netty-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StonyShi","download_url":"https://codeload.github.com/StonyShi/reactor-netty-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243141239,"owners_count":20242819,"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":["http-server","jersey","netty","reactor"],"created_at":"2024-09-24T18:05:28.614Z","updated_at":"2026-03-03T14:35:36.484Z","avatar_url":"https://github.com/StonyShi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### reactor-netty-ext\n#### 1. [reactor-netty](https://github.com/reactor/reactor-netty)  jersey1.x的扩展\n#### 2. 扩展get方法支持get?p=1 的方式访问\n#### 3. 支持静态资源不加配置前缀（如不加: `/res` ）\n#### 4. 增加对原有路由全桥接，支持静态文件访问\n### 代码示例：\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.stonyshi\u003c/groupId\u003e\n    \u003cartifactId\u003ereactor-netty-ext\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n```\n final Path resource = Paths.get(NettyServerTest.class.getResource(\"/public\").toURI());\n HttpServer.create(8080)\n         .startAndAwait(JerseyBasedHandler.builder()\n                 .withClassPath(\"com.stoney.reactor.jerysey.router\")\n                 .addValueProvider(JacksonProvider.class)\n                 .addRouter(routes -\u003e {\n                     routes.get(\"/get\", (req, resp) -\u003e resp.sendString(Mono.just(\"asdfasdf\")))\n                     .directory(\"/res\", resource);\n                 }).build()\n         );\n\n@Path(\"/api\")\npublic class ServiceHot {\n    @POST()\n    @Path(\"/post\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Produces(MediaType.APPLICATION_JSON)\n    public UserTest post(UserTest body) {\n        System.out.println(\"body = \" + body);\n        return new UserTest(\"bai\", 200, \"li\");\n    }\n    @GET()\n    @Path(\"/get\")\n    @Produces(MediaType.APPLICATION_JSON)\n    public UserTest get() {\n        return new UserTest(\"bai\", 199, \"li\");\n    }\n}\n\n\n\ncurl -X POST \\\n  http://localhost:8080/hot/post \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -H 'postman-token: f202fc59-94b9-f0e3-307d-35cb0fe885d6' \\\n  -d '{\"first_name\":\"li\",\"name\":\"jiu\",\"id\":200}'\n\n\n\n  {\n      \"name\": \"bai\",\n      \"id\": 200,\n      \"first_name\": \"li\"\n  }\n```\n##test\n```\n\nwrk -H 'Connection: keep-alive' -t12 -c400 -d30s http://localhost:8082/get\n\nRunning 30s test @ http://localhost:8082/get\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.99ms   31.79ms 892.82ms   99.18%\n    Req/Sec     7.29k     0.93k   23.47k    93.04%\n  2606144 requests in 30.10s, 248.54MB read\nRequests/sec:  86582.83\nTransfer/sec:      8.26MB\n\nwrk -H 'Connection: keep-alive' -t20 -c400 -d30s http://localhost:8082/api/get?id=3887099059629981696\nRunning 30s test @ http://localhost:8082/api/get?id=3887099059629981696\n  20 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    54.04ms    9.31ms 142.88ms   71.88%\n    Req/Sec   370.86     53.38   676.00     71.84%\n  221881 requests in 30.08s, 107.92MB read\n  Socket errors: connect 0, read 221881, write 0, timeout 0\nRequests/sec:   7376.17\nTransfer/sec:      3.59MB\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonyshi%2Freactor-netty-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstonyshi%2Freactor-netty-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonyshi%2Freactor-netty-ext/lists"}