Skip to content

Commit

Permalink
Use proper config key for REST Client override URI
Browse files Browse the repository at this point in the history
(cherry picked from commit f2f4a2f)
  • Loading branch information
geoand authored and gsmet committed Sep 25, 2024
1 parent 42fe3d8 commit 96e2ad0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ public <T> T build(Class<T> aClass) throws IllegalStateException, RestClientDefi
RestClientsConfig restClients = config.getConfigMapping(RestClientsConfig.class);

// support overriding the URI from the override-uri property
Optional<String> maybeOverrideUri = restClients.getClient(aClass).overrideUri();
var overrideUrlKeyName = String.format("quarkus.rest-client.\"%s\".override-uri", aClass.getName());
Optional<String> maybeOverrideUri = config.getOptionalValue(overrideUrlKeyName, String.class);
if (maybeOverrideUri.isPresent()) {
uri = URI.create(maybeOverrideUri.get());
}
Expand Down

0 comments on commit 96e2ad0

Please sign in to comment.