Service Class — spring-boot Architecture
Architecture documentation for the Service class in ElasticCommonSchemaProperties.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/logging/structured/ElasticCommonSchemaProperties.java lines 80–101
public record Service(@Nullable String name, @Nullable String version, @Nullable String environment,
@Nullable String nodeName) {
static final Service NONE = new Service(null, null, null, null);
@SuppressWarnings("NullAway") // Doesn't detect lambda with correct nullability
void jsonMembers(Members<?> members) {
members.add("service").usingMembers((service) -> {
service.add("name", this::name).whenHasLength();
service.add("version", this::version).whenHasLength();
service.add("environment", this::environment).whenHasLength();
service.add("node").usingMembers((node) -> node.add("name", this::nodeName).whenHasLength());
});
}
Service withDefaults(Environment environment) {
String name = withFallbackProperty(environment, this.name, "spring.application.name");
String version = withFallbackProperty(environment, this.version, "spring.application.version");
return new Service(name, version, this.environment, this.nodeName);
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free