{"id":17299685,"url":"https://github.com/threefish/webframework","last_synced_at":"2025-10-09T17:07:48.402Z","repository":{"id":93223522,"uuid":"58450316","full_name":"threefish/WebFrameWork","owner":"threefish","description":"basisMvc 自己写的Web MVC框架，这是一个基于servlet与java注解的Web框架","archived":false,"fork":false,"pushed_at":"2016-09-09T09:48:14.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T23:02:05.428Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.sgaop.com","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/threefish.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-10T10:02:03.000Z","updated_at":"2016-09-05T07:21:23.000Z","dependencies_parsed_at":"2023-04-04T05:16:08.883Z","dependency_job_id":null,"html_url":"https://github.com/threefish/WebFrameWork","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/threefish/WebFrameWork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefish%2FWebFrameWork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefish%2FWebFrameWork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefish%2FWebFrameWork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefish%2FWebFrameWork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threefish","download_url":"https://codeload.github.com/threefish/WebFrameWork/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefish%2FWebFrameWork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001892,"owners_count":26083197,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T11:23:20.590Z","updated_at":"2025-10-09T17:07:48.397Z","avatar_url":"https://github.com/threefish.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **basis  MVC**\n- 基于servlet与java注解的Web MVC 框架\n- _**basis** 意思： n. 基础；底部；主要成分；基本原则或原理_\n\n\n## 基于Java注解和servlet3.0+实现通过注解方式访问的web MVC框架\n\n### 已实现\n- 实现缓存扫描注解action\n- 实现参数自动绑定\n    - 参数与javabean自动绑定\n    - 文件上传自动绑定\n- 实现文件过滤器\n    - 文件后缀格式控制\n    - 文件上传大小限制\n- 实现视图控制器\n    - jsp页面返回\n    - json对象返回\n    - 404、500页面\n    - 文件下载\n- jsp页面返回的处理优化\n- 添加@Setup 启动执行任务\n- 绑定durid连接池\n\n### 正在添加中\n- 简易的orm功能\n- aop的实现\n- 暂未想到的功能.....\n\n\n### CODE\n```\n@WebController(\"/mainController\")\npublic class MainController {\n\n  //@OK(\"rd:testpage.jsp\")//重定向\n  //@OK(\"json\")//返回JSON对象\n    @OK(\"jsp:testpage.jsp\")//返回jsp页面\n  //@OK(\"fw:testpage.jsp\")//转发\n    @GET//请求方式\n    @Path//默认使用方法名\n    public AjaxRsult index(\n            @Parameter(\"id\") int id,\n            @Parameter(\"name\") String name,\n            @Parameter(\"age\") int age,\n            @Parameter(\"doubleNum\") double doubleNum,\n            @Parameter(\"flag\") boolean flag,\n            @Parameter(\"ids\") String[] ids,\n            HttpServletRequest request) {\n        System.out.println(\"----\" + id + \"----\" + name + \"----\" + age);\n        System.out.println(\"mian index\");\n        request.setAttribute(\"test\", \"测试request.setAttribute\");\n        return new AjaxRsult(true, \"呵呵呵\", \"json哦\");\n    }\n\n    @OK(\"rd:testpage.jsp\")\n    @GET\n    @Path(\"/testpage\")\n    public void testpage() {\n        System.out.println(\"---testpage\");\n    }\n\n    @OK(\"json\")\n    @POST\n    @Path(\"/buildBeanFile\")\n    public AjaxRsult buildBeanFile(@Parameter(\"data\u003e\u003e\") TestbuildBean bean, @Parameter(\"docName\")TempFile docName) {\n        System.out.println(new Gson().toJson(bean));\n        System.out.println(docName.getName());\n        try {\n            IoTool.writeFile(docName.getInputStream(),\"d:\\\\\"+docName.getName());\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n        return new AjaxRsult(true, \"呵呵呵\", bean);\n    }\n\n    @OK(\"json\")\n    @POST\n    @Path(\"/buildBeanFiles\")\n    public AjaxRsult buildBeanFiles(@Parameter(\"data\u003e\u003e\") TestbuildBean bean, @Parameter(\"docName\")TempFile[] docName) {\n        System.out.println(new Gson().toJson(bean));\n        for(TempFile file:docName){\n            System.out.println(file.getName());\n            System.out.println(file.getContentType());\n        }\n        return new AjaxRsult(true, \"批量文件上传\", bean);\n    }\n\n\n    @OK(\"json\")\n    @POST\n    @Path(\"/buildBean\")\n    public AjaxRsult buildBean(@Parameter(\"data\u003e\u003e\") TestbuildBean bean) {\n        System.out.println(new Gson().toJson(bean));\n        Connection connection=DBConn.getDbConn();\n        System.out.println(connection);\n        return new AjaxRsult(true, \"呵呵呵\", bean);\n    }\n\n\n    @OK(\"file\")\n    @GET\n    @Path(\"/dowload\")\n    public File dowloadFile() {\n        return new File(\"D:/site-1.8.9.zip\");\n    }\n\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefish%2Fwebframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreefish%2Fwebframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefish%2Fwebframework/lists"}