{"id":28491477,"url":"https://github.com/line/flagship4j","last_synced_at":"2025-07-04T23:30:38.071Z","repository":{"id":265771266,"uuid":"821301362","full_name":"line/Flagship4j","owner":"line","description":"Feature toggle system API-Client SDK follow OpenFeature specification.","archived":false,"fork":false,"pushed_at":"2025-05-06T10:08:07.000Z","size":2916,"stargazers_count":53,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-08T08:07:26.650Z","etag":null,"topics":[],"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/line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"supports/flagship4j-javaflagr-spring-boot-web-starter/build.gradle","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-28T08:34:18.000Z","updated_at":"2025-06-07T10:51:50.000Z","dependencies_parsed_at":"2024-12-01T08:01:53.300Z","dependency_job_id":"4728ce23-db8d-40a8-9617-1d0906dc5056","html_url":"https://github.com/line/Flagship4j","commit_stats":null,"previous_names":["line/flagship4j"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/line/Flagship4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FFlagship4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FFlagship4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FFlagship4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FFlagship4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/Flagship4j/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2FFlagship4j/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263635372,"owners_count":23492182,"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":[],"created_at":"2025-06-08T08:07:27.320Z","updated_at":"2025-07-04T23:30:38.060Z","avatar_url":"https://github.com/line.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flagship4j\n\n---\n\nFlagship4j is a Java library that provides multiple API client SDKs to integrate with toggle systems (for now, we support [Openflagr](https://github.com/openflagr/flagr)) and follows the [Open-Feature](https://openfeature.dev/) specification.\nThere are different libraries for different use-cases, e.g. flagship4j-openfeature-javaflagr-starter for pure Java application, flagship4j-openfeature-spring-boot-starter for a Spring Boot application. \n \nThe libraries are listed below:\n## Libraries\n\n| Name                                                                                                                                                                   | Description                                                                      |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|\n| [flagship4j-javaflagr-core](/libs/flagship4j-javaflagr-core)                                           | Native OpenFlagr SDK for Java                                                    |\n| [flagship4j-openfeature-provider-javaflagr](/libs/flagship4j-openfeature-provider-javaflagr)           | OpenFlagr Provider for OpenFeature                                               |\n| [flagship4j-openfeature-javaflagr-starter](/supports/flagship4j-openfeature-javaflagr-starter)         | A convenient dependency descriptors for using OpenFeature SDK with OpenFlagr SDK |\n| [flagship4j-javaflagr-spring-boot-web-starter](/supports/flagship4j-javaflagr-spring-boot-web-starter) | (Deprecated) OpenFlagr implementation for Spring Boot Web Starter                |\n| [flagship4j-openfeature-spring-boot-starter](/supports/flagship4j-javaflagr-spring-boot-web-starter)   | Auto configuration with OpenFeature and OpenFlagr SDK for Spring Boot Starter    |\n\n## Prerequisites\n\n- Java 8 or later if you are a user.\n\n## Getting started\n\nThere are many libraries we provide. Among them, we mostly recommend to use the flagship4j-openfeature-spring-boot-starter.\nFor other libraries and use cases, please refer to the [Examples](#Examples) and [Libraries](#Libraries)\n\n### Use feature toggle via OpenFeature interface\n\n#### maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.linecorp.flagship4j\u003c/groupId\u003e\n  \u003cartifactId\u003eflagship4j-openfeature-spring-boot-starter\u003c/artifactId\u003e\n  \u003cversion\u003e${version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### gradle\n```groovy\ndependencies {\n    implementation \"org.springframework.boot:spring-boot-starter\"\n    implementation \"com.linecorp.flagship4j:flagship4j-openfeature-spring-boot-starter\"\n}\n```\n\n#### Config\nplease refer to [Configuration options](#Configuration-options)\n```yaml\nflagship4j:\n  toggle:\n    flagr:\n      baseUrl: http://localhost:18000\n      connectionTimeout: 30\n      readTimeout: 30\n      callTimeout: 30\n      writeTimeout: 30\n```\n\n#### Code\n```java\n\n    private final Client client; // dependency injected by spring \n            \n    ... other code\n            \n    ... someMethod(...) {\n            Boolean isHelloWorldEnabled = client.getBooleanValue(\"hello-world-enabled\", false);\n            if (isHelloWorldEnabled) {\n            System.out.println(\"Hello World\");\n        }   \n    }\n```\n\n## Install to local Maven repository\n\n- If you are developing flagship4j for your other application in local\n- Perform following command to deploy to local maven repository (~/.m2/repository)\n\n```sh\n./gradlew clean build publishToMavenLocal\n```\n\n## Configuration options\n\n| Name                | Description                                                                                            | Required | Default value |\n| ------------------- | ------------------------------------------------------------------------------------------------------ | -------- | ------------- |\n| `endpoint`          | The URL of the OpenFlagr evaluator.                                                                    | Yes      |               |\n| `connectionTimeout` | A time period for establish a connection to the OpenFlagr host                                         | Yes      |               |\n| `readTimeout`       | The maximum time of inactivity between two data packets when waiting for the OpenFlagr host response   | Yes      |               |\n| `writeTimeout`      | The maximum time of inactivity between two data packets when sending the request to the OpenFlagr host | Yes      |               |\n| `callTimeout`       | The time limit for a complete HTTP call to the OpenFlagr host                                          | Yes      |               |\n\n## Examples\n\n| Name                                                                                                                             | Description                                                     |\n| -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |\n| [On / Off](/examples/openfeature-example)                      | An simple example of OpenFeature with OpenFlagr provider        |\n| [A/B Testing](/examples/openfeature-abtest-example)            | An A/B testing example of OpenFeature with OpenFlagr provider   |\n| [Canary Release](/examples/openfeature-canary-release-example) | A canary release example of OpenFeature with OpenFlagr provider |\n| [White List](/examples/openfeature-white-list-example)         | A white list example of OpenFeature with OpenFlagr provider     |\n\n## Contributing\n\nIf you believe you found a vulnerability or you have an issue related to security, please **DO NOT** open a public issue. Instead, send us an email at [dl_oss_dev@linecorp.com](mailto:dl_oss_dev@linecorp.com).\n\nBefore contributing to this project, please read the [CONTRIBUTING](/CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fflagship4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fflagship4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fflagship4j/lists"}