Starting StartupInfoLoggerTests "spring-boot" v1.2.3 using Java 17.0.12 (started by dmytronosan in /Users/dmytronosan/IdeaProjects/spring-boot/spring-boot-project/spring-boot)
Starting AOT-processed StartupInfoLoggerTests "spring-boot" v1.2.3 using Java 17.0.12 with PID 42 (started by dmytronosan in /Users/dmytronosan/IdeaProjects/spring-boot/spring-boot-project/spring-boot)
Starting StartupInfoLoggerTests "spring-boot" v1.2.3 using Java 17.0.12 with PID 42 (started by dmytronosan in /Users/dmytronosan/IdeaProjects/spring-boot/spring-boot-project/spring-boot)
Restored StartupInfoLoggerTests "spring-boot" in 0.0 seconds
Started StartupInfoLoggerTests "spring-boot" in 0.0 seconds (process running for 1.345)
spring.application.name is not present
Starting StartupInfoLoggerTests v1.2.3 using Java 17.0.12 with PID 42 (started by dmytronosan in /Users/dmytronosan/IdeaProjects/spring-boot/spring-boot-project/spring-boot)
gh-42330
Comment From: nosan
git.commit.id if needed could be fetched by:
private void appendGitCommit(StringBuilder message) {
append(message, "", () -> {
String location = this.environment.getProperty("spring.info.git.location", "classpath:git.properties");
String encoding = this.environment.getProperty("spring.info.git.encoding", "UTF-8");
Resource resource = this.resourceLoader.getResource(location);
Properties properties = loadSource(resource, encoding);
return properties.getProperty("git.commit.id");
});
}
private Properties loadSource(Resource location, String encoding) throws IOException {
if (encoding != null) {
return PropertiesLoaderUtils.loadProperties(new EncodedResource(location, encoding));
}
return PropertiesLoaderUtils.loadProperties(location);
}
Comment From: wilkinsona
Thanks for the proposal, @nosan, but as indicated by the pending-design-work label we're not ready to work on this one until we've done some design work and, unfortunately, we don't have time for that right now. If you'd like to suggest something that contributes to that design effort when it eventually happens, please do so on the issue.