diff --git a/README.md b/README.md index 458a33d452b3255915008c73a527cae17ebd922a..d385147c58182b864b1fc58c8a57b113ba8691aa 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ _The following steps show how to get the SDK running_ Configuration properties e.g. for REST-API urls and proxy settings can be found in the YAML config ``config.yml`` within the root folder of the project. -In order to run the SDK client a configuration needs to be provided as file in the same path as the jar (e.g. when the commandline client is used) or via reference using the environment variable ``CONFIG_LOCATION`` (e.g. when the SDK is used programmatically). +In order to run the SDK client a configuration needs to be provided as file in the same path as the jar (e.g. when the commandline client is used) or via reference using the environment variable ``FIT_CONNECT_CONFIG`` (e.g. when the SDK is used programmatically). <p align="right">(<a href="#top">back to top</a>)</p> diff --git a/client/README.md b/client/README.md index 486ba31898a6c55f7d0aaa15efaec091271a2408..c8a2130f9f53bc40c8b2defdaf187b7b1ca48c6c 100644 --- a/client/README.md +++ b/client/README.md @@ -6,9 +6,9 @@ The sdk comes with a commandline client to be able to use the sdk without any co #### Setup & Build 1. Build project root wih ``./mvnw clean package`` 2. Go to client/target and find a runnable jar ``client-VERSION.jar`` -3. set environment variable ``CONFIG_LOCATION`` or drop a configured [config.yml](../config.yml) file next to the runnable jar - 1. Linux/MacOS: ``export CONFIG_LOCATION=path/to/config.yml`` - 2. Windows: ``set CONFIG_LOCATION=C:\Path\To\config.yml`` +3. set environment variable ``FIT_CONNECT_CONFIG`` or drop a configured [config.yml](../config.yml) file next to the runnable jar + 1. Linux/MacOS: ``export FIT_CONNECT_CONFIG=path/to/config.yml`` + 2. Windows: ``set FIT_CONNECT_CONFIG=C:\Path\To\config.yml`` 4. run client with ``java -jar client-VERSION.jar [COMMAND] [OPTIONS]`` #### SEND Example diff --git a/client/src/main/java/dev/fitko/fitconnect/client/factory/ClientFactory.java b/client/src/main/java/dev/fitko/fitconnect/client/factory/ClientFactory.java index 40e8d04390b7ef02d3a2e1ec7ca80225a6549705..6a6aeb31ac1021d640a5b66e093fd9ea9885fe03 100644 --- a/client/src/main/java/dev/fitko/fitconnect/client/factory/ClientFactory.java +++ b/client/src/main/java/dev/fitko/fitconnect/client/factory/ClientFactory.java @@ -45,7 +45,7 @@ public final class ClientFactory { private static final Logger LOGGER = LoggerFactory.getLogger(ClientFactory.class); private static final String CONFIG_DEFAULT_LOCATION = "config.yml"; - private static final String CUSTOM_CONFIG_KEY = "CONFIG_LOCATION"; + private static final String CUSTOM_CONFIG_KEY = "FIT_CONNECT_CONFIG"; private static final String SENDER_BANNER = getSplashScreenResource("/sender-banner.txt"); private static final String SUBSCRIBER_BANNER = getSplashScreenResource("/subscriber-banner.txt"); @@ -215,7 +215,7 @@ public final class ClientFactory { LOGGER.info("Using sdk environment config {} with {}", applicationConfig.getCurrentEnvironment(), applicationConfig); return applicationConfig; } catch (final IOException e) { - throw new IllegalStateException("Config could not be loaded, please provide a 'config.yml' in the root path or in the ENV-var 'CONFIG_LOCATION'", e); + throw new IllegalStateException("Config could not be loaded, please provide a 'config.yml' in the root path or in the ENV-var 'FIT_CONNECT_CONFIG'", e); } }