Package io.quarkus.restclient.config
Class RestClientFallbackConfigSourceInterceptor
java.lang.Object
io.smallrye.config.AbstractMappingConfigSourceInterceptor
io.smallrye.config.FallbackConfigSourceInterceptor
io.quarkus.restclient.config.RestClientFallbackConfigSourceInterceptor
- All Implemented Interfaces:
io.smallrye.config.ConfigSourceInterceptor,Serializable
public class RestClientFallbackConfigSourceInterceptor
extends io.smallrye.config.FallbackConfigSourceInterceptor
- See Also:
-
Field Summary
Fields inherited from interface io.smallrye.config.ConfigSourceInterceptor
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static String[](package private) static String[]Splits a property key into client prefix and property name.iterateNames(io.smallrye.config.ConfigSourceInterceptorContext context) If an MP-style property is detected (e.g.Methods inherited from class io.smallrye.config.FallbackConfigSourceInterceptor
getValueMethods inherited from class io.smallrye.config.AbstractMappingConfigSourceInterceptor
getMapping
-
Constructor Details
-
RestClientFallbackConfigSourceInterceptor
public RestClientFallbackConfigSourceInterceptor()
-
-
Method Details
-
iterateNames
If an MP-style property is detected (e.g. "prefix/mp-rest/url"), we need to include the relevant Quarkus-style property name ("quarkus.rest-client.prefix.url") in the iteration.This is required so that the BuildTimeConfigurationReader is aware that it should create the configuration objects for REST clients (
RestClientsConfig.RestClientConfig).- Specified by:
iterateNamesin interfaceio.smallrye.config.ConfigSourceInterceptor- Overrides:
iterateNamesin classio.smallrye.config.AbstractMappingConfigSourceInterceptor
-
extractQuarkusClientPrefixAndProperty
Splits a property key into client prefix and property name. If given key doesn't contain a client prefix, null will be returned in the first array item.Examples:
- `client-prefix.url` will return `String[] {"client-prefix", "url"}`
- `"client.prefix".url` will return `String[] {"client.prefix", "url"}`
- `"disable-smart-produces` will return `String[] {null, "disable-smart-produces"}`
- Parameters:
key- property key- Returns:
- two-item array containing the client prefix and the property name
-
extractMPClientPrefixAndProperty
-