Open romain-grecourt opened 1 year ago
Please use LazyValue.create(GlobalConfig::config);
instead to obtain configuration.
We should also register GlobalConfig
from MP startup when we create an instance of MP configuration that will be used, so we have a consistent config.
Also, we need to consider having support for microprofile. And we should also considering moving the jersey integration under microprofile so that we can do all the microprofile glue without having conflicting dependencies.
we do not need to use MP APIs, if we configured GlobalConfig
correctly in MP (the glue code is then only in MP).
Roger that. This means that If the Helidon MicroProfile server sets GlobalConfig
properly, then the connector config feature can support MicroProfile config indirectly.
GlobalConfig.config()
always returns a value:
public static Config config() {
return configured() ? CONFIG.get() : DEFAULT_CONFIG.get();
}
If the feature is invoked before GlobalConfig
is initialized by the MicroProfile server, then it will use the default config.
Also if the feature is used in a non server application, then GlobalConfig will have to be initialized manually in order to support MicroProfile config.
Helidon Version: 4.0.0-M1
Currently the Helidon Jersey Connector can only configure the underlying WebClient by looking up a JAXRS client property named
jersey.connector.helidon.config
.When using MicroProfile rest client programmatically we can also set the property:
However when using CDI, it's not possible to pass configuration without implementing a feature:
Since config is now available statically, we should provide the feature above out of the box. Perhaps also support MicroProfile config.