Skip to content
Snippets Groups Projects
Commit 214eab3b authored by Martin Vogel's avatar Martin Vogel
Browse files

refactor(config): rename environment config var to FIT_CONNECT_CONFIG

parent c5d3480e
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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
......
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment