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 ConditionalOnProperty

Constructs this bean only when a configuration key has a value.

With havingValue empty, any value other than false counts. Evaluated once at start-up, like Profile, and checked by the build the same way.

Methods

public abstract String[] value() default {}The key, or several keys that must all match.
public abstract String[] name() default {}Same as value; Spring accepts either.
public abstract String prefix() default ""Prepended to each key, with a dot.
public abstract String havingValue() default ""The value to require, compared ignoring case.
public abstract boolean matchIfMissing() default falseWhether an unset key counts as a match.

Method details

value

public abstract String[] value() default {}
The key, or several keys that must all match.

name

public abstract String[] name() default {}
Same as value; Spring accepts either.

prefix

public abstract String prefix() default ""
Prepended to each key, with a dot.

havingValue

public abstract String havingValue() default ""
The value to require, compared ignoring case. Empty means anything but false.

matchIfMissing

public abstract boolean matchIfMissing() default false
Whether an unset key counts as a match.