@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
public @ConfigProperty(name="old.location")
String location; //maps to the property name server.old.location
public String getContext() {
return context;
}
}
public abstract String prefix
Copyright © 2020 Eclipse Foundation. All rights reserved.