Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
@Retention(CLASS) @Target({FIELD, PARAMETER, METHOD})
public @interface Value
Injects a configuration value.
${key} reads key from Config – a system
property, the environment, the profile’s properties file or the base one, in
that order – and ${key:fallback} supplies a value when none of them has
it. The text around a reference is kept, so "${host}:${port}" works. A
String, a primitive or its box, or an enum can receive one; the conversion is
written into the generated entry point.
A key nobody sets, with no fallback, is a start-up error naming the key: a missing setting is the deployment’s mistake, and start-up is where it is cheap to see.
Methods
public abstract String value() | The expression, such as ${mail.host:localhost}. |
Method details
value
public abstract String value()The expression, such as
${mail.host:localhost}.