-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring boot : application name / version not shown at log startup. #42324
Comments
Sorry, I don't think I understand the problem that you're reporting. The Can you please clarify what you expected to happen and why you had those expectations, for example linking to documentation that says that the contents of the |
gotcha, make sense.
To be honest I was just expecting to have the info from build-info printed somewhere. Using the class name seems strange if you have spring.application.name as properties. I was expecting to have build.info that is explicitly generated to get this information to be used by default if no version or no name was present. After another look at it the documentation doesn't say anything about using build-info information. And may be, it doesn't make sense to use them as build can be different than application. Yet from actuator perspective that is the only information that are shown by default (I would assume application and version should be there as default). build version / build name. |
I've opened #42324 to consider logging a bit more. In the meantime, you can use a custom |
Thanks, banner.txt is a bit overkilled for my need, also as you said BuildProperties is not loaded at that time. I've just created a log line from a bean creation with BuildProperties. After more thought about it, I think this log is fine as it show low level information from the startup of what is running etc. Here is the start up :
Perhaps the "appendApplicationName"[Application] should not be stripped of .class and all higher level information should be printed with the profile line. like version.
Just an idea. |
While the documentation give the way to create a file properties with all informations (build.info).
https://docs.spring.io/spring-boot/how-to/build.html#howto.build.generate-info
The code doesn't take into consideration those informations.
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java
Lines 103 to 115 in 00440b9
The code seems to have changed tho I am using springboot 3.3.3.
However, it seems that build.info properties are completely ignored even now.
#41604
Regarding the application name there is also a properties : spring.application.name
wondering if that properties is not better than the class name to determine the application name.
The text was updated successfully, but these errors were encountered: