-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43774 from radcortez/fix-43748
Move RestClientReactiveConfig to use @ConfigMapping
- Loading branch information
Showing
5 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 13 additions & 9 deletions
22
...ntime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientReactiveConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
package io.quarkus.rest.client.reactive.runtime; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
import io.smallrye.config.WithName; | ||
|
||
/** | ||
* Build time REST client config. | ||
*/ | ||
@ConfigRoot(name = "rest-client", phase = ConfigPhase.BUILD_TIME) | ||
public class RestClientReactiveConfig { | ||
@ConfigMapping(prefix = "quarkus.rest-client") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public interface RestClientReactiveConfig { | ||
|
||
/** | ||
* By default, RESTEasy Reactive uses text/plain content type for String values | ||
* and application/json for everything else. | ||
* | ||
* <p> | ||
* MicroProfile Rest Client spec requires the implementations to always default to application/json. | ||
* This build item disables the "smart" behavior of RESTEasy Reactive to comply to the spec | ||
*/ | ||
@Deprecated // Deprecated in favour of RestClientsConfig.disableSmartProduces | ||
@ConfigItem(name = "disable-smart-produces", defaultValue = "false") | ||
public boolean disableSmartProduces; | ||
@WithName("disable-smart-produces") | ||
@WithDefault("false") | ||
boolean disableSmartProduces(); | ||
|
||
/** | ||
* Whether providers (filters, etc.) annotated with {@link jakarta.ws.rs.ext.Provider} should be | ||
* automatically registered for all the clients in the application. | ||
*/ | ||
@ConfigItem(name = "provider-autodiscovery", defaultValue = "true") | ||
public boolean providerAutodiscovery = true; | ||
@WithName("provider-autodiscovery") | ||
@WithDefault("true") | ||
boolean providerAutodiscovery(); | ||
} |