# netty-hapi **Repository Path**: fengyd/netty-hapi ## Basic Information - **Project Name**: netty-hapi - **Description**: 基于netty封装的http接口框架,能快速搭建http(https)服务器。 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-11 - **Last Updated**: 2022-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # netty-hapi #### 介绍 基于netty封装的http接口框架,能快速搭建http(https)服务器。 #### 软件架构 软件架构说明。 xml配置项:是路由扫描路径,不配置将整个项目扫描,如若配置之外的路由将无法加入。 新版本新增文件类型映射,可以指定对应连接响应对应文件。 ``` @RequestMapping(value="*", type=HapiRouteType.PATH) public void jweb_root(HapiHttpRequest request, HapiHttpResponse response){ String url = request.getUrl(); if(url.endsWith(".html")){ response.setHead(HttpHeaderNames.CONTENT_TYPE.toString(), "text/html "); } if(url.endsWith(".css")){ response.setHead(HttpHeaderNames.CONTENT_TYPE.toString(), "text/css"); } if(url.endsWith(".js")){ response.setHead(HttpHeaderNames.CONTENT_TYPE.toString(), "application/javascript"); } response.setContent("webcontent"+url); } ``` - 路由类型是PATH表示将指定路由转接到对应的文件夹中; - *表示通配符,指所有没有特定路由的地址; - 特定路由将执行特定路由函数,不参与通配函数,顺序则是特定路由优先; #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. Maven中央仓库没有最新版本。 2. 使用参考:https://github.com/taixiongliu/hapidemo #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) ``` 这里输入代码 ```