liveBook · Manning

Git commit metadata

As explained in Spring in Action, Sixth Edition

Metadata describing the Git revision and commit associated with a project build.

Git commit metadata records which Git revision produced a build. Spring Boot can package it as a build-time git.properties file and expose it through the /info endpoint, making the deployed code state traceable. section 15.3.1

The integration works in a few practical steps:

  • Add the Git-properties plugin to Maven or Gradle; the project must be a Git clone or contain at least one commit. section 15.3.1

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains plugin generation, runtime discovery, basic fields, full mode, and missing-repository handling.
Examples
Shows basic and full JSON responses, Maven and Gradle plugin configuration, and a dirty working-tree indicator.
What it assumes
Assumes a Spring Boot application using Actuator and a Git repository with at least one commit.
What you can do after
Apply it via Maven or Gradle to expose the revision used to build a Spring Boot application.
How it connects
Connects Git, Spring Boot Actuator, the /info endpoint, Maven, Gradle, and build-time artifacts.

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.