{"id":13565393,"url":"https://github.com/networknt/light-4j","last_synced_at":"2026-02-20T04:02:26.911Z","repository":{"id":37669465,"uuid":"67836637","full_name":"networknt/light-4j","owner":"networknt","description":"A fast, lightweight and more productive microservices framework","archived":false,"fork":false,"pushed_at":"2026-02-18T21:38:09.000Z","size":13425,"stargazers_count":3680,"open_issues_count":14,"forks_count":635,"subscribers_count":185,"default_branch":"master","last_synced_at":"2026-02-18T23:51:58.227Z","etag":null,"topics":["cloud","cloud-native","consul","docker","fast","java","java11","java8","lightweight","microservice","microservice-framework","msa","openapi","service-mesh","swagger","zookeeper"],"latest_commit_sha":null,"homepage":"","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/networknt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit-config/pom.xml","citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-09-09T22:28:14.000Z","updated_at":"2026-02-18T21:24:12.000Z","dependencies_parsed_at":"2023-09-22T04:23:22.385Z","dependency_job_id":"74deeb7e-0e00-4a46-ad94-0cb20c870c98","html_url":"https://github.com/networknt/light-4j","commit_stats":{"total_commits":2393,"total_committers":63,"mean_commits":37.98412698412698,"dds":0.1617216882574175,"last_synced_commit":"d8fb0a4004d6d46d646bedefcfce340b4662c68e"},"previous_names":["networknt/light-java","networknt/undertow-server"],"tags_count":195,"template":false,"template_full_name":null,"purl":"pkg:github/networknt/light-4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networknt%2Flight-4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networknt%2Flight-4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networknt%2Flight-4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networknt%2Flight-4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/networknt","download_url":"https://codeload.github.com/networknt/light-4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networknt%2Flight-4j/sbom","scorecard":{"id":681154,"data":{"date":"2025-08-11","repo":{"name":"github.com/networknt/light-4j","commit":"26b17bb56d3e32cdbb7f826a90772580e9192318"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.2,"checks":[{"name":"Code-Review","score":2,"reason":"Found 6/29 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T23:12:26.976Z","repository_id":37669465,"created_at":"2025-08-21T23:12:26.976Z","updated_at":"2025-08-21T23:12:26.976Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29640861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cloud","cloud-native","consul","docker","fast","java","java11","java8","lightweight","microservice","microservice-framework","msa","openapi","service-mesh","swagger","zookeeper"],"created_at":"2024-08-01T13:01:46.080Z","updated_at":"2026-02-20T04:02:24.811Z","avatar_url":"https://github.com/networknt.png","language":"Java","readme":"A fast, lightweight and cloud-native microservices framework.\n\n[Stack Overflow](https://stackoverflow.com/questions/tagged/light-4j) |\n[Google Group](https://groups.google.com/forum/#!forum/light-4j) |\n[Gitter Chat](https://gitter.im/networknt/light-4j) |\n[Subreddit](https://www.reddit.com/r/lightapi/) |\n[Youtube Channel](https://www.youtube.com/channel/UCHCRMWJVXw8iB7zKxF55Byw) |\n[Documentation](https://doc.networknt.com) |\n[Contribution Guide](https://doc.networknt.com/contribute/) |\n\n[![Build Status](https://travis-ci.org/networknt/light-4j.svg?branch=master)](https://travis-ci.org/networknt/light-4j) [![codecov.io](https://codecov.io/github/networknt/light-4j/coverage.svg?branch=master)](https://codecov.io/github/networknt/light-4j?branch=master)\n\n## Why call it Light-4J\n\nLight means lightweight, lightning fast and shedding light on how to program with modern Java SE for cloud-native deployment.\n\n## Why am I doing it\n\nI had been working on the Java EE platforms since early 2000 and suffered the performance and productivity issues. In 2014, I realized that the IT industry was moving from Monolithic to Microservices and from on-premise data centers to the public clouds.\n\nTo reduce the production cost for my applications, I need to find a lightweight platform that has a small memory footprint,  high throughput, and low latency in Java. Java EE and Spring/Spring Boot are too heavy to be considered. Other lightweight Java platforms all have different issues on the separation between the business logic and technical cross-cutting concerns. Moreover, they are not cloud-native or designed for container/cloud.\n\nWithout finding anything suitable, I started to build my open-source platform light-4j on top of the Undertow HTTP core by following the [principles](https://doc.networknt.com/about/principles/). Because my approach is very radical, and it is against products from big corporations, I have been attacked by some entities online and offline constantly. However, I am so convinced that my approach is the future direction and spend all my effort to continue the development. Today, a lot of companies are using light-4j on production with very positive feedback. It further encourages me to devote myself to the framework and to extend the platform to build an ecosystem.\n\nFor users who benefit from the platform, you can [become a sponsor](https://github.com/sponsors/stevehu) for me so that I can put all my effort into the open-source projects.\n\n## Why use this framework\n\n### Fast and small memory footprint to lower production cost.\n\nIt is 44 times faster than the most popular microservices platform Spring Boot embedded Tomcat and use only 1/5 of memory. Here are the [benchmark](https://github.com/networknt/microservices-framework-benchmark) results compare with Spring Boot and other microservices frameworks. Here is the third party [comparison](https://www.techempower.com/benchmarks/) with other Web frameworks.\n\n### Provide an embedded gateway to address cross-cutting concerns.\n* Plugin architecture for startup/shutdown hooks and middleware components\n* Distributed OAuth2 JWT security verification as part of the framework\n* Request and response validation against OpenAPI specification at runtime\n* Metrics collected in Influxdb/Prometheus and viewed from Grafana Dashboard for both services and clients\n* Global exception handling for runtime exception, API exception, and other checked exceptions\n* Mask sensitive data like the credit card, sin number, etc. before logging\n* Sanitize cross-site scripting for query parameters, request headers and body\n* Audit to dump important info or entire request and response.\n* Body parser to support different content types\n* Standardized response code and messages from the configuration file\n* Externalized configuration for all modules for the dockerized environment\n* CORS pre-flight handler for SPA (Angular or React) from another domain\n* Rate limiting for services that exposed outside to the Internet\n* Service registry and discovery support direct, Consul and Zookeeper\n* Client-side discovery and load balance to eliminate proxies\n* A client module that is tightly integrated with Light-OAuth2 and supports traceability\n\n### Design and Test driven development to increase productivity\nDesign OpenAPI specification and generate the service from it. The specification is also\npart of the framework to drive security verification and request validation at runtime.\n\nUnit/End-to-End test stubs are generated to enable test driven approach for quality product.\n\nDebugging within IDE just like standalone application for better developer productivity.\n\n### Built-in DevOps flow to support continuous integration to production\n\nDockerfile and DevOps supporting files are generated to support dockerization and continuous\nintegration to production.\n\n### Multiple frameworks for different type of microservices\n\n- [light-rest-4j](https://github.com/networknt/light-rest-4j) is a RESTful microservice framework with OpenAPI specification for code generation and runtime security and validation\n- [light-graphql-4j](https://github.com/networknt/light-graphql-4j) is a GraphQL microservice framework that supports schema generation from IDL and plugin.\n- [light-hybrid-4j](https://github.com/networknt/light-hybrid-4j) is a hybrid microservice framework that takes advantages of both monolithic and microservice architectures.\n- [light-eventuate](https://github.com/networknt/light-eventuate-4j) is a messaging based microservice framework based on Kafka, event sourcing and CQRS\n\n### Multiple languages support\n\nAll the open sourced frameworks are built in Java and we are working on Nodejs framework internally.\nIn the future, we might provide Golang framework as well and all them are sharing the same eco-system\nand market place.\n\n\n### OAuth2 server, portal and services to form ecosystem\n\n[OAuth2 Server](https://github.com/networknt/light-oauth2) for security and [Portal](https://github.com/networknt/light-portal)\nfor production monitor and management. The portal is also a marketplace to link clients and services\ntogether.\n\n\n## Getting Started\n\nThere are two ways to start your project:\n\n### Light-codegen generator\n\nYou can use [light-codegen](https://github.com/networknt/light-codegen) to generate a working project.\nCurrently, it supports light-rest-4j, light-graphql-4j, light-hybrid-server-4j and light-hybrid-service-4j.\nlight-eventuate code generator is coming.\n\nThe light-codegen project README.md describes four ways to use the generator with examples.\n\n* Clone and build the light-codgen and use the codegen-cli command line utility\n* Use docker image networknt/light-codegen to run the codegen-cli command line utility\n* Use generate.sh from [model-config](https://github.com/networknt/model-config) repo to generate projects based on conventions.\n* Generate code from web site with codegen-web API. (API is ready but UI needs to be built)\n\n\n### Starting from an example project\n\nThe other way to start your project is to copy from [light-example-4j](https://github.com/networknt/light-example-4j).\n\nYou can find the description of these [examples](https://www.networknt.com/example/)\n\nAlso, there are some [tutorials](https://www.networknt.com/tutorial/)\n\n\n## Debugging\n\n[To run/debug from IDE](https://www.networknt.com/tutorial/common/debug/), you need to\nconfigure a Java application with main class \"com.networknt.server.Server\" and working\ndirectory is your project folder. There is no container and you are working on just a standalone\nJava application.\n\n\n## Start Server\n\n### In IDE\ncreate a Java application that main class is com.networknt.server.Server and working\ndirectory is your project root folder. You can debug your server just like a POJO application.\n\n### From Maven\n\nmvn exec:exec\n\n### Command Line\n\n```\njava -jar target/demo-0.1.0.jar\n```\n\n## Stop Server\n\nyou can use Ctrl+C to kill the server but for production use the following command\n\n```\nkill -s TERM \u003cpid\u003e\n```\n\nThe server has a shutdown hook and the above command allow it to clean up. For example,\ncomplete in-flight requests and close the database connections etc. If service registry\nand discovery is used, then the server will send shutdown event to service registry and\nkeep processing requests for 30 seconds until all clients refreshes their local cache\nbefore shutting down.\n\n## Appreciation\n\n- Light-4j has been optimized by using open source license of [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html)\nfrom [ej-technologies](http://www.ej-technologies.com/).\n\n## License\n\nLight-4j and all light-*-4j frameworks are available under the Apache 2.0 license. See the [LICENSE](https://www.apache.org/licenses/LICENSE-2.0)\nfile for more info.\n","funding_links":["https://github.com/sponsors/stevehu"],"categories":["Java","Frameworks / Runtimes","HarmonyOS","zookeeper","开发框架"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworknt%2Flight-4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetworknt%2Flight-4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworknt%2Flight-4j/lists"}