Skip to content

Configuration Reference

Reference: the complete key table.

Resolution

  1. -Dkey=value command-line overrides (and programmatic appConfig().set) — checked first on every read, the engines' f:setConfig analog.
  2. The configuration file: resources/application.yml | .yaml | .properties, in the working directory or next to the application file, or --config <path>.
  3. ${ENV_VAR:default} substitution inside values: environment first, then a base configuration key of that name, then the default.

Well-known keys (shared with the engines)

Key Meaning Default
application.name application identity in logs, /info and /health application
rest.server.port Event API + actuator port 8085
log.format text, json (pretty-printed) or compact (single-line JSONL) text
log.level log level; the LOG_LEVEL environment variable wins INFO
info.app.version version reported by /info package version
info.app.description description reported by /info application.name
show.env.variables opt-in list of environment variables shown by /env (empty)
show.application.properties opt-in list of configuration keys shown by /env (empty)
mandatory.health.dependencies routes of health check functions that decide /health (empty)
optional.health.dependencies health check routes reported but never affecting status (empty)
otel.forwarding the OpenTelemetry forwarder's master switch (guide) false
otel.exporter.otlp.endpoint the OTLP/HTTP traces URL including the signal path http://localhost:4318/v1/traces
otel.exporter.otlp.headers request headers, k=v or k: v, comma-separated (re-read per export) (none)
otel.exporter.otlp.timeout per-export timeout in milliseconds, connect included 10000
otel.exporter.otlp.connect.timeout no effect here (a warning names it) -
otel.exporter.otlp.compression only none is honoured (a warning otherwise) none
otel.service.name the service.name resource attribute of exported spans application.name

List-valued keys accept a comma/space-separated string (engine syntax) or a YAML list.

Programmatic access

import { appConfig } from 'mercury-composable';

const config = appConfig();
const port = config.get('rest.server.port', 8085);
const name = config.getProperty('application.name', 'application');
config.set('feature.flag', 'on');    // runtime override, checked first