@Documented @Target(value={FIELD,PARAMETER,TYPE}) @Retention(value=RUNTIME) @Experimental(value="ConfigMapping API to group configuration properties") public @interface ConfigMapping
@ConfigMapping(prefix = "server")
public interface Server {
public String host(); // maps the property name server.host
public int port(); // maps to the property name server.port
}
This annotation is also used in CDI aware environments to scan and register Config Mappings. Otherwise, Config
Mapping interfaces require registration via
SmallRyeConfigBuilder.withMapping(java.lang.Class, java.lang.String).| Modifier and Type | Optional Element and Description |
|---|---|
ConfigMapping.NamingStrategy |
namingStrategy
The naming strategy to use for the config mapping.
|
String |
prefix
The prefix of the configuration properties.
|
public abstract String prefix
public abstract ConfigMapping.NamingStrategy namingStrategy
Copyright © 2018–2021. All rights reserved.