Class MainSupport

java.lang.Object
io.camunda.zeebe.shared.MainSupport

public final class MainSupport extends Object
Utility class for shared behavior in application `main`, i.e. program entry points. This helps ensure all executables have some sane defaults (e.g. applying system properties, per thread uncaught exception handler, etc.)
  • Method Details

    • setDefaultGlobalConfiguration

      public static void setDefaultGlobalConfiguration()
      Sets global configuration for all executable classes:
      • Sets the default uncaught exception handler for all threads to FatalErrorHandler
      • Sets default system properties if they haven't been overridden by the user
    • createDefaultApplicationBuilder

      public static org.springframework.boot.builder.SpringApplicationBuilder createDefaultApplicationBuilder()
      Returns the default SpringApplicationBuilder for all executables in the distribution module, with sane defaults.
    • putSystemPropertyIfAbsent

      public static void putSystemPropertyIfAbsent(String key, String value)
      Sets system properties only if they haven't been set already, allowing users to override them via CLI or other means