@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
AnnotatedTypeMetadata metadata) {
Environment environment = context.getEnvironment();
String config = environment.resolvePlaceholders("${logging.file:}");
if (StringUtils.hasText(config)) {
return ConditionOutcome.match("Found logging.file: " + config);
}
config = environment.resolvePlaceholders("${logging.path:}");
if (StringUtils.hasText(config)) {
return ConditionOutcome.match("Found logging.path: " + config);
}
config = new RelaxedPropertyResolver(environment, "endpoints.logfile.")
.getProperty("external-file");
if (StringUtils.hasText(config)) {
return ConditionOutcome
.match("Found endpoints.logfile.external-file: " + config);
}
return ConditionOutcome.noMatch("Found no log file configuration");
}
EndpointWebMvcManagementContextConfiguration.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:https-github.com-g0t4-jenkins2-course-spring-boot
作者:
评论列表
文章目录