Class ConfigResolver

java.lang.Object
app.l2nx.gs.adapter.core.config.ConfigResolver

public final class ConfigResolver extends Object
Resolves adapter configuration from a two-source chain (per key), file-first:
  1. Properties file — either the absolute path given by -Dl2nx.config-file=<path> (operator-preferred), or the classpath resource l2nx.properties as a fallback when l2nx.config-file is unset.
  2. JVM system property (e.g. -Dl2nx.gs-key=...) — consulted only when the file does not provide the key.
Pure JDK — no Spring, no SnakeYAML, no third-party config library. Environment-variable resolution is intentionally absent in 0.1.0; file is the preferred medium and is authoritative when present. Both file and classpath sources are read as UTF-8.
  • Constructor Details

    • ConfigResolver

      public ConfigResolver()
  • Method Details

    • resolve

      public AdapterConfig resolve()
    • resolveString

      public Optional<String> resolveString(String key)
    • resolveBoolean

      public boolean resolveBoolean(String key, boolean defaultValue)
    • resolveServerKey

      public String resolveServerKey()
    • resolvePlatformUrl

      public String resolvePlatformUrl()
    • resolveEnabled

      public boolean resolveEnabled()
    • resolveAdapterVersion

      public String resolveAdapterVersion()