Feature flag evaluation for any JVM application — local, no-network-per-check, fail-closed.
repositories {
mavenCentral()
}
dependencies {
implementation 'dev.mozhno:mozhno-client-java:1.1.2'
}<dependency>
<groupId>dev.mozhno</groupId>
<artifactId>mozhno-client-java</artifactId>
<version>1.1.2</version>
</dependency>var config = MozhnoConfig.builder()
.appName("my-app")
.instanceId("instance-1")
.mozhnoUrl("https://flags.example.com")
.apiKey("env-abc123")
.build();
var client = new DefaultMozhnoClient(config);
client.start();
var ctx = MozhnoContext.builder().userId("42").build();
boolean on = client.isEnabled("new-checkout", ctx);- Evaluate locally — flags are fetched once and evaluated in-memory. No network call per
isEnabled(). - Fail-closed — missing flags or fetch failures return
false(or your default), never throw. - Server + client modes — full flag set for server-side apps; pre-evaluated toggles for client-side.
- Spring Boot auto-configuration — auto-wire a
MozhnoClientfromapplication.ymlproperties. FakeMozhnoClient— in-memory implementation for tests. No HTTP, no server needed.
| Field | Default | Description |
|---|---|---|
appName |
— (required) | Application name registered in Mozhno |
instanceId |
— (required) | Unique instance identifier |
apiKey |
— (required) | Server/Client API key from Mozhno dashboard |
mozhnoUrl |
— (required) | URL of your Mozhno server |
fetchTogglesInterval |
15s | How often to poll for flag updates |
sendMetricsInterval |
60s | How often to flush metrics |
disableMetrics |
false | Disable usage metrics |
synchronousFetchOnInitialisation |
false | Block start() until first fetch completes |
- JDK 17+
Apache 2.0 — see LICENSE.