@Target(value={METHOD,FIELD,PARAMETER,TYPE}) @Retention(value=RUNTIME) @Documented @Qualifier public @interface ConfigProperties
@ConfigProperties(prefix = "server")
public class MyServer {
public String host; // maps the property name server.host
public int port; // maps to the property name server.port
private String context; // maps to the property name server.context
@ConfigProperty(name = "old.location")
public String location; // maps to the property name server.old.location
public String getContext() {
return context;
}
}
| Modifier and Type | Fields and Description |
|---|---|
static String |
UNCONFIGURED_PREFIX |
public static final String UNCONFIGURED_PREFIX
public abstract String prefix
Copyright © 2020 Eclipse Foundation. All rights reserved.