Class InvalidConfigurationPropertyValueException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException
- All Implemented Interfaces:
Serializable
public class InvalidConfigurationPropertyValueException extends RuntimeException
Exception thrown when a configuration property value is invalid.- Since:
- 2.0.0
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description InvalidConfigurationPropertyValueException(String name, Object value, String reason)
Creates a new instance for the specified propertyname
andvalue
, including areason
why the value is invalid.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Return the name of the property.String
getReason()
Return the reason why the value is invalid.Object
getValue()
Return the invalid value, can benull
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
InvalidConfigurationPropertyValueException
public InvalidConfigurationPropertyValueException(String name, Object value, String reason)
Creates a new instance for the specified propertyname
andvalue
, including areason
why the value is invalid.- Parameters:
name
- the name of the property in canonical formatvalue
- the value of the property, can benull
reason
- a human-readable text that describes why the reason is invalid. Starts with an upper-case and ends with a dots. Several sentences and carriage returns are allowed.