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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RestClientFallbackConfigSourceInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static String[]extractMPClientPrefixAndProperty(String key)(package private) static String[]extractQuarkusClientPrefixAndProperty(String key)Splits a property key into client prefix and property name.Iterator<String>iterateNames(io.smallrye.config.ConfigSourceInterceptorContext context)If an MP-style property is detected (e.g.
-
-
-
Method Detail
-
iterateNames
public Iterator<String> iterateNames(io.smallrye.config.ConfigSourceInterceptorContext context)
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 (RestClientConfig).- Specified by:
iterateNamesin interfaceio.smallrye.config.ConfigSourceInterceptor- Overrides:
iterateNamesin classio.smallrye.config.AbstractMappingConfigSourceInterceptor
-
extractQuarkusClientPrefixAndProperty
static String[] extractQuarkusClientPrefixAndProperty(String key)
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
-
-