diff --git a/media-backend-api-client/pom.xml b/media-backend-api-client/pom.xml index 0e8bc185..eb7ac556 100644 --- a/media-backend-api-client/pom.xml +++ b/media-backend-api-client/pom.xml @@ -55,12 +55,16 @@ nl.vpro.shared vpro-shared-rs - + + nl.vpro.poms.api-clients + client-core + + diff --git a/media-backend-api-client/src/main/java/nl/vpro/api/client/media/MediaRestClient.java b/media-backend-api-client/src/main/java/nl/vpro/api/client/media/MediaRestClient.java index 546b9e68..40dd0145 100644 --- a/media-backend-api-client/src/main/java/nl/vpro/api/client/media/MediaRestClient.java +++ b/media-backend-api-client/src/main/java/nl/vpro/api/client/media/MediaRestClient.java @@ -28,6 +28,7 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue; import nl.vpro.api.client.resteasy.AbstractApiClient; +import nl.vpro.api.client.utils.Config; import nl.vpro.api.rs.subtitles.*; import nl.vpro.domain.media.*; import nl.vpro.domain.media.search.*; @@ -44,6 +45,7 @@ import nl.vpro.rs.media.MediaBackendRestService; import nl.vpro.util.*; +import static nl.vpro.api.client.utils.Config.URLS_FILE; import static nl.vpro.domain.media.EntityType.AllMedia.valueOf; import static nl.vpro.domain.media.search.Pager.Direction.ASC; @@ -345,7 +347,9 @@ public static Builder configured(Env env, String... configFiles) { */ public static Builder configured(Env env) { Builder builder = builder(); - ConfigUtils.configuredInHome(env, builder, "mediarestclient.properties", "creds.properties"); + Config config = new Config(URLS_FILE, "mediarestclient.properties"); + config.setEnv(env); + ReflectionUtils.configured(builder, config.getProperties(Config.Prefix.media_api_backend)); return builder; }