GitResourceAvailableCondition Class — spring-boot Architecture
Architecture documentation for the GitResourceAvailableCondition class in ProjectInfoAutoConfiguration.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration.java lines 97–114
static class GitResourceAvailableCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
ResourceLoader loader = context.getResourceLoader();
Environment environment = context.getEnvironment();
String location = environment.getProperty("spring.info.git.location");
if (location == null) {
location = "classpath:git.properties";
}
ConditionMessage.Builder message = ConditionMessage.forCondition("GitResource");
if (loader.getResource(location).exists()) {
return ConditionOutcome.match(message.found("git info at").items(location));
}
return ConditionOutcome.noMatch(message.didNotFind("git info at").items(location));
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free