PropertiesConfigurationFactory.java 文件源码

java
阅读 45 收藏 0 点赞 0 评论 0

项目:https-github.com-g0t4-jenkins2-course-spring-boot 作者:
public void bindPropertiesToTarget() throws BindException {
    Assert.state(this.properties != null || this.propertySources != null,
            "Properties or propertySources should not be null");
    try {
        if (this.logger.isTraceEnabled()) {
            if (this.properties != null) {
                this.logger.trace(String.format("Properties:%n%s", this.properties));
            }
            else {
                this.logger.trace("Property Sources: " + this.propertySources);
            }
        }
        this.hasBeenBound = true;
        doBindPropertiesToTarget();
    }
    catch (BindException ex) {
        if (this.exceptionIfInvalid) {
            throw ex;
        }
        this.logger.error("Failed to load Properties validation bean. "
                + "Your Properties may be invalid.", ex);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号