Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
@Retention(CLASS) @Target({TYPE, METHOD})
public @interface ConfigurationProperties
Binds a group of configuration keys to the setters of a bean.
@Component
@ConfigurationProperties("mail")
public class MailSettings {
private String host = "localhost";
private int port = 25;
public void setHost(String host) { this.host = host; }
public void setPort(int port) { this.port = port; }
}
Reads mail.host and mail.port, and calls a setter only when its key is
set, so a field initializer is the default. The build lists the setters and
writes one typed read per setter into the entry point; nothing is discovered
at run time. Spring’s relaxed binding applies to the setter name: setMaxSize
reads mail.max-size when mail.maxSize is not set.
Methods
public abstract String value() default "" | The key prefix, without the trailing dot. |
public abstract String prefix() default "" | Same as value; Spring accepts either. |
Method details
value
public abstract String value() default ""The key prefix, without the trailing dot.
prefix
public abstract String prefix() default ""Same as
value; Spring accepts either.