diff options
author | Michal Banka <michal.banka@nokia.com> | 2020-09-14 23:04:37 +0200 |
---|---|---|
committer | Michal Banka <michal.banka@nokia.com> | 2020-09-15 11:26:56 +0200 |
commit | 80a8297a4b84eb33a0f77e9a56283e3c8fb5f929 (patch) | |
tree | fc41e3f0c6d95500feab2c764a5bd91dc9d28918 /src/main/java/org/onap/dcae/ApplicationSettings.java | |
parent | 9872f0081fa4aec5e41b89fc9a5fe3d4cd19d5c9 (diff) |
Fix bug throwing exception when first event is collected
- Problem: When running app from jar (e.g. in docker env) ClassLoader
badly interprete classpath as root of app jar, while resources are
located in jar under BOOT-INF/classes/ in Spring Boot apps.
- Solution: Moved file from resources to etc directory so ClassLoader
isn't needed. Filepath of api_version_description.json which
previously was badly resolved now is configured in collector.properties.
Change-Id: I690394cc59e16c95f5902045efc3fdaf13bf9112
Signed-off-by: Michal Banka <michal.banka@nokia.com>
Issue-ID: DCAEGEN2-2426
Diffstat (limited to 'src/main/java/org/onap/dcae/ApplicationSettings.java')
-rw-r--r-- | src/main/java/org/onap/dcae/ApplicationSettings.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/onap/dcae/ApplicationSettings.java b/src/main/java/org/onap/dcae/ApplicationSettings.java index 7d5c7db2..9462a380 100644 --- a/src/main/java/org/onap/dcae/ApplicationSettings.java +++ b/src/main/java/org/onap/dcae/ApplicationSettings.java @@ -196,6 +196,10 @@ public class ApplicationSettings { return eventTransformations; } + public String getApiVersionDescriptionFilepath() { + return properties.getString("collector.description.api.version.location", "etc/api_version_description.json"); + } + private void loadPropertiesFromFile() { try { properties.load(configurationFileLocation); |