DefaultValue

Annotation that can be used to specify the default value when binding to an immutable property. This annotation can also be used with nested properties to indicate that a value should always be bound (rather than binding null). The value from this annotation will only be used if the property is not found in the property sources used by the Binder. For example, if the property is present in the org.springframework.core.env.Environment when binding to @ConfigurationProperties, the default value for the property will not be used even if the property value is empty.

NOTE: This annotation does not support property placeholder resolution and the value must be constant.

Author

Madhura Bhave

Pavel Anisimov

Since

2.2.0

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
abstract fun value(): Array<String>
The default value of the property.