-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Add SpringInfoContributor #38356
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
Add SpringInfoContributor #38356
Conversation
#22924 is related to this. |
e3d5c14
to
b9728d7
Compare
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/SpringInfo.java
Outdated
Show resolved
Hide resolved
Would it make sense to detect other used frameworks that can supply information as well? Like Spring Security, Spring Integration? Or maybe even provide a |
@mdeinum In some of the cases, yes. E.g.: Spring Security seems possible, it has a similar class that tells you the version of it. But in other cases, not really: e.g.: Spring Data projects are versioned separately and as far as I know, the release train version is not available. Also, in case of Spring Cloud, the dependency is the other way: Boot does not depend on Cloud but Cloud depends on Boot, so here we will not be able to add the Cloud version but Cloud needs to add it (a |
This InfoContributor exposes information related to Spring projects.
b9728d7
to
f9e01c2
Compare
I like the idea of the portfolio project versions as an |
My feeling is that we should probably close this one. I agree with @mhalbritter that we should make the list of versions more complete. SBOM's are becoming increasingly popular and I think they are the right way to achieve that. An SBOM could be generated at build time using one of the existing build plugins and then, if desired, packaged in the application and exposed through an actuator endpoint. |
What do you think about providing information about the effective profiles?
|
The |
Isn't For example, if I don't set the active profiles property but set this.profiles = ObjectUtils.isEmpty(environment.getActiveProfiles()) ? environment.getDefaultProfiles() : environment.getActiveProfiles(); |
Thanks, @jonatan-ivanov. Sorry, I'd missed the distinction you were making between effective and active. I think our best option here would be to add a new field to the env endpoint that shows the default profiles alongside the active profiles. I'd rather do that than change the meaning of the existing field. I've opened #39245. |
This
InfoContributor
exposes information related to Spring projects through actuator's info endpoint as part of the Enhanced Observability effort: #25476When configured, it looks like this:
The feature can be enabled by setting:
management.info.spring.enabled=true
.