Skip to the content
Krizaka Java
Skip to Content
Krizaka Java

App config

krizaka-app-config — app version compatibility — a public app-config endpoint, 426 Upgrade Required and N-1 contracts, from database parameters.

<dependency>
  <groupId>com.krizaka</groupId>
  <artifactId>krizaka-spring-boot-starter-app-config</artifactId>
</dependency>

A mobile or desktop app outlives the API it calls. The app sends three headers on every request — X-Client-Platform, X-Client-Version, X-Contract-Version — and the service answers:

  • GET /api/v1/app-config?platform=ios&version=1.4.0, public and cached: the minimum and latest version, the update mode (none, soft, force), maintenance, the contract range, the store URL, feature flags and a localized message;
  • 426 Upgrade Required (Problem Details carrying that payload) below the minimum, before authentication;
  • N-1 compatibility: the previous contract keeps working, with Deprecation: true and a Sunset date.

Every value is a database parameter with safety bounds, a reason and an audit trail; the admin API (krizaka.app-config.admin.enabled=true) publishes, lists the history and rolls back. If the parameters cannot be read the service serves the last known value, then permissive defaults: an outage of the parameters never locks the app.

krizaka:
  app-config:
    store: jdbc          # memory in tests
    cache-ttl: 30s
    admin:
      enabled: true      # needs ROLE_ADMIN (krizaka.app-config.admin.authority)

The tables are in krizaka-app-config-schema.sql (apply them with the service's own migration), and the contract is shared with the TypeScript package @krizaka/app-config: one JSON schema, one fixture, both implementations pass it.

Configuration

Generated from the configuration metadata — the full reference lists every artifact.

PropertyDescription
krizaka.app-config.admin.authorityStringdefault ROLE_ADMINAuthority a caller must hold to use the admin API.
krizaka.app-config.admin.enabledBooleandefault falseWhether the audited admin API (/api/v1/admin/app-config) is registered.
krizaka.app-config.cache-ttlDurationdefault 30sHow long this instance reuses a parameter set it read.
krizaka.app-config.enabledBooleandefault trueWhether the app-config endpoint and the version filter are registered.
krizaka.app-config.guard.enabledBooleandefault trueWhether the 426 Upgrade Required filter is registered.
krizaka.app-config.guard.excludeList<String>default [/api/v1/app-config, /api/v1/admin/app-config/**]Ant patterns the filter never guards: the app-config endpoint itself, so an old client can always learn it must update.
krizaka.app-config.guard.includeList<String>default /api/**Ant patterns of the paths the filter guards.
krizaka.app-config.http-max-ageDurationdefault 60sMax-age of the public app-config endpoint, for CDNs and clients.
krizaka.app-config.storeStoredefault jdbcWhere the parameters are kept: 'jdbc' (the application's database) or 'memory' (tests and demos).jdbcmemory

On this page