{"id":18477799,"url":"https://github.com/zhengframework/zhengframework","last_synced_at":"2025-04-08T14:33:47.611Z","repository":{"id":37129977,"uuid":"249097117","full_name":"zhengframework/zhengframework","owner":"zhengframework","description":"modular framework with many ready-to-use modules","archived":false,"fork":false,"pushed_at":"2022-12-27T14:41:34.000Z","size":34926,"stargazers_count":3,"open_issues_count":24,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T15:43:30.207Z","etag":null,"topics":["activemq","guice","healthcheck","hibernate","jax-rs","jcache","jdbc","jetty","lightweight","memcached","modular","mongodb","mybatis","rabbitmq","rest","resteasy","restful-webservices","undertow","web-framework","webframework"],"latest_commit_sha":null,"homepage":"https://zhengframework.github.io/zhengframework/","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/zhengframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-22T02:15:08.000Z","updated_at":"2020-09-14T06:42:04.000Z","dependencies_parsed_at":"2023-01-31T03:45:50.317Z","dependency_job_id":null,"html_url":"https://github.com/zhengframework/zhengframework","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengframework%2Fzhengframework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengframework%2Fzhengframework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengframework%2Fzhengframework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengframework%2Fzhengframework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhengframework","download_url":"https://codeload.github.com/zhengframework/zhengframework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247861282,"owners_count":21008461,"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":["activemq","guice","healthcheck","hibernate","jax-rs","jcache","jdbc","jetty","lightweight","memcached","modular","mongodb","mybatis","rabbitmq","rest","resteasy","restful-webservices","undertow","web-framework","webframework"],"created_at":"2024-11-06T12:06:09.167Z","updated_at":"2025-04-08T14:33:42.601Z","avatar_url":"https://github.com/zhengframework.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zheng framework\n\nplease go to documentation website [zhengframework](https://zhengframework.github.io/zhengframework/)\n\n![Java CI with Maven](https://github.com/zhengframework/zhengframework/workflows/Java%20CI%20with%20Maven/badge.svg)\n[![][maven img]][maven]\n[![][release img]][release]\n[![][snapshot img]][snapshot]\n[![][license img]][license]\n\n[maven]:http://search.maven.org/#search|gav|1|g:\"com.github.zhengframework\"%20AND%20a:\"zheng-core\"\n[maven img]:https://maven-badges.herokuapp.com/maven-central/com.github.zhengframework/zheng-bootstrap/badge.svg\n\n[snapshot]:https://github.com/zhengframework/zhengframework\n[snapshot img]:https://img.shields.io/nexus/s/com.github.zhengframework/zheng-core?server=https%3A%2F%2Foss.sonatype.org\n\n[release]:https://github.com/zhengframework/zhengframework/releases\n[release img]:https://img.shields.io/github/v/release/zhengframework/zhengframework.svg\n\n[license]:LICENSE.txt\n[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg\n\nZheng framework is a modular framework with many ready-made modules.\n\nZheng framework uses Google guice for dependency management. For ease of use, most modules support automatic loading through ServiceLoader.\n\n## Quick Start\n\n### step 1: add maven dependency\n```\n\u003cdependencyManagement\u003e\n    \u003cdependencies\u003e\n      \u003cdependency\u003e\n        \u003cartifactId\u003ezheng-bom\u003c/artifactId\u003e\n        \u003cgroupId\u003ecom.github.zhengframework\u003c/groupId\u003e\n        \u003cscope\u003eimport\u003c/scope\u003e\n        \u003ctype\u003epom\u003c/type\u003e\n        \u003cversion\u003e${zheng.version}\u003c/version\u003e\n      \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cartifactId\u003ezheng-bootstrap\u003c/artifactId\u003e\n      \u003cgroupId\u003ecom.github.zhengframework\u003c/groupId\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cartifactId\u003ezheng-web-jetty\u003c/artifactId\u003e\n      \u003cgroupId\u003ecom.github.zhengframework\u003c/groupId\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cartifactId\u003ezheng-rest\u003c/artifactId\u003e\n      \u003cgroupId\u003ecom.github.zhengframework\u003c/groupId\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### step 2: add config\ncreate config file in resource dir:\n\n`src/test/resources/application.properties`\n\ncontent:\n```\nzheng.web.contextPath=/\nzheng.web.port=8080\nzheng.rest.path=/\n```\n\n### step 3: create rest resource\n\ncreate a class to show inject object.\n```\npublic class Man {\n\n  public String say() {\n    return \"hello, thanks to use zheng framework\";\n  }\n}\n```\n\n```\nimport javax.inject.Inject;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"first\")\npublic class FirstResource {\n  private final Man man;\n\n  @Inject\n  public FirstResource(Man man) {\n    this.man = man;\n  }\n  \n  @GET\n  @Path(\"hello\")\n  public String hello() {\n    return man.say();\n  }\n}\n```\n### step 4: create guice module\n\n```\nimport com.google.inject.servlet.ServletModule;\n\npublic class FirstModule extends ServletModule {\n\n  @Override\n  protected void configureServlets() {\n    bind(FirstResource.class);\n  }\n}\n\n```\n\n### step 5: create bootstrap class\n\n```\nimport com.github.zhengframework.bootstrap.ZhengApplication;\nimport com.github.zhengframework.bootstrap.ZhengApplicationBuilder;\n\npublic class FirstUseZhengFramework {\n\n  public static void main(String[] args) throws Exception {\n    ZhengApplication application = ZhengApplicationBuilder.create()\n        .addModule(new FirstModule())\n        .build();\n    application.start();\n  }\n}\n```\n\n### step 6: run code\n\n1. please run `FirstUseZhengFramework.main`\n2. open your web browser, enter url: `http://127.0.0.1:8080/first/hello`\n3. you will get string: **hello, thanks to use zheng framework**\n\n\n### Module Info\n\n| Module      | status      | auto load   |\n| ----------- | ----------- | ----------- |\n| zheng-configuration | OK | yes |\n| zheng-web-jetty | OK | yes |\n| zheng-web-undertow | OK | yes |\n| zheng-webjars | OK | yes |\n| zheng-swagger | OK | yes |\n| zheng-rabbitmq | OK | yes |\n| zheng-healthcheck | OK | yes |\n| zheng-cache | OK | yes |\n| zheng-mongodb | OK | yes |\n| zheng-memcached | OK | yes |\n| zheng-redis | OK | yes |\n| zheng-metrics | OK | yes |\n| zheng-metrics-servlet | OK | yes |\n| zheng-rest | OK | yes |\n| zheng-shiro | OK | yes |\n| zheng-shiro-web | OK | yes |\n| zheng-shiro-jaxrs | OK | yes |\n| zheng-log-logback | OK | yes |\n| zheng-jdbc | OK | yes |\n| zheng-migrate-flyway | OK | yes |\n| zheng-migrate-liquibase | OK | yes |\n| zheng-jdbc-jooq | OK | yes |\n| zheng-jdbc-querydsl | OK | yes |\n| zheng-jdbc-jdbi | OK | yes |\n| zheng-jdbc-sql2o | OK | yes |\n| zheng-jdbc-commons-dbutils | OK | yes |\n| zheng-jdbc-ebean | OK | yes |\n| zheng-jpa-hibernate | OK | yes |\n| zheng-jpa-eclipselink | OK | yes |\n| zheng-mybatis | OK | yes |\n| zheng-event-guava | OK | yes |\n| zheng-validator-hibernate | OK | yes |\n| zheng-validator-bval | OK | yes |\n| zheng-job | OK | yes |\n| zheng-remote-config | OK | yes |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengframework%2Fzhengframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhengframework%2Fzhengframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengframework%2Fzhengframework/lists"}