Fix bug throwing exception when first event is collected 42/112642/5
authorMichal Banka <michal.banka@nokia.com>
Mon, 14 Sep 2020 21:04:37 +0000 (23:04 +0200)
committerMichal Banka <michal.banka@nokia.com>
Tue, 15 Sep 2020 09:26:56 +0000 (11:26 +0200)
commit80a8297a4b84eb33a0f77e9a56283e3c8fb5f929
treefc41e3f0c6d95500feab2c764a5bd91dc9d28918
parent9872f0081fa4aec5e41b89fc9a5fe3d4cd19d5c9
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
Changelog.md
dpo/data-formats/ConsulConfig.json
dpo/spec/vescollector-componentspec.json
etc/api_version_description.json [new file with mode: 0644]
etc/collector.properties
src/main/java/org/onap/dcae/ApplicationSettings.java
src/main/java/org/onap/dcae/common/HeaderUtils.java
src/main/java/org/onap/dcae/restapi/VesRestController.java
src/main/resources/api_version_config.json [deleted file]
src/test/java/org/onap/dcae/common/JsonDataLoader.java
src/test/java/org/onap/dcae/restapi/VesRestControllerTest.java