ConfigurationPropertiesBindException Class — spring-boot Architecture
Architecture documentation for the ConfigurationPropertiesBindException class in ConfigurationPropertiesBindException.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindException.java lines 30–66
public class ConfigurationPropertiesBindException extends BeanCreationException {
private final ConfigurationPropertiesBean bean;
ConfigurationPropertiesBindException(ConfigurationPropertiesBean bean, Exception cause) {
super(bean.getName(), getMessage(bean), cause);
this.bean = bean;
}
/**
* Return the bean type that was being bound.
* @return the bean type
*/
public Class<?> getBeanType() {
return this.bean.getType();
}
/**
* Return the configuration properties annotation that triggered the binding.
* @return the configuration properties annotation
*/
public ConfigurationProperties getAnnotation() {
return this.bean.getAnnotation();
}
private static String getMessage(ConfigurationPropertiesBean bean) {
ConfigurationProperties annotation = bean.getAnnotation();
StringBuilder message = new StringBuilder();
message.append("Could not bind properties to '");
message.append(ClassUtils.getShortName(bean.getType())).append("' : ");
message.append("prefix=").append(annotation.prefix());
message.append(", ignoreInvalidFields=").append(annotation.ignoreInvalidFields());
message.append(", ignoreUnknownFields=").append(annotation.ignoreUnknownFields());
return message.toString();
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free