Info
/actuator/info tells which build runs: its name and version, the git commit it was built from, any details you add, and optionally the operating system and the Dart version. Each part comes from an info contributor.
Why
When something goes wrong in production, the first question is which version is running. The info endpoint answers it in the same JSON every Spring tool reads, without a controller of your own.
Example
# lib/resources/application.yml
management:
endpoints:
web:
exposure:
include: health,info
info:
env:
enabled: true
dart:
enabled: true
git:
mode: simple
info:
app:
team: neon-books
support: [email protected]
$ curl localhost:8080/actuator/info
{"app":{"team":"neon-books","support":"[email protected]"},
"git":{"branch":"main","commit":{"id":"4faa522","time":"2026-11-04T18:02:11Z"}},
"build":{"artifact":"shop","name":"shop","version":"1.4.0"},
"dart":{"version":"3.13.5","channel":"stable","runtime":{"name":"Dart VM","version":"3.13.5 (stable) ..."}}}
info is not exposed by default: add it to management.endpoints.web.exposure.include.
The contributors
| Contributor | Shows | Default | Switched by |
|---|---|---|---|
build |
The build.* keys of spring.info.build.location (resources:build-info.properties): build.name, build.version, build.time... |
on when the file exists | management.info.build.enabled |
git |
The git.* keys of spring.info.git.location (resources:git.properties), in simple mode (branch, short commit id, time) or full (every key) |
on when the file exists | management.info.git.enabled, management.info.git.mode |
env |
The info.* properties, without the prefix |
off | management.info.env.enabled |
os |
The operating system's name, version and arch |
off | management.info.os.enabled |
dart |
The Dart version, channel and runtime (Spring Boot's java) |
off | management.info.dart.enabled |
build and git follow management.info.defaults.enabled when their own key is not set.
The build and git files
| Key | Default | Meaning |
|---|---|---|
spring.info.build.location |
resources:build-info.properties |
Where the build information is (resources: or file:) |
spring.info.build.encoding |
UTF-8 |
Its encoding: UTF-8 or ISO-8859-1 |
spring.info.git.location |
resources:git.properties |
Where the git information is |
spring.info.git.encoding |
UTF-8 |
Its encoding |
For an application (publish_to: none in pubspec.yaml) that depends on the actuator, the generator embeds a build-info.properties with build.artifact, build.name and build.version from pubspec.yaml. It writes no build time, so the generated code stays the same from one build to the next. Put your own lib/resources/build-info.properties to add more (a time, a CI build number); it replaces the generated one.
git.properties is not generated. Write it in CI before build_runner, for example:
cat > lib/resources/git.properties <<EOF
git.branch=$(git rev-parse --abbrev-ref HEAD)
git.commit.id=$(git rev-parse HEAD)
git.commit.id.abbrev=$(git rev-parse --short HEAD)
git.commit.time=$(git log -1 --format=%cI)
EOF
Times are read as ISO-8601 instants or milliseconds since the epoch, and written as Spring Boot writes them (2026-11-05T09:12:44Z).
The BuildProperties and GitProperties beans
When their files exist, the buildProperties and gitProperties beans give the same values to the application, for an "about" page or a log line:
@Component()
@Log()
class VersionLog implements ApplicationRunner {
VersionLog(this.build);
final BuildProperties build;
@override
void run(ApplicationArguments args) => log.info('Running ${build.name} ${build.version}');
}
A contributor of your own
An InfoContributor bean adds its details:
@Component()
class CatalogInfoContributor implements InfoContributor {
CatalogInfoContributor(this.catalog);
final Catalog catalog;
@override
void contribute(InfoBuilder builder) =>
builder.withDetail('catalog', {'books': catalog.size});
}
A library switches its own contributor with @ConditionalOnEnabledInfoContributor('catalog') (management.info.catalog.enabled).
In Spring (Java)
The same contributors and properties, except: java is dart; the os values are Dart's (Platform.operatingSystem); process and ssl do not exist; the files are read from resources: (Spring Boot: classpath:META-INF/build-info.properties and classpath:git.properties), and build-info.properties is written by the generator instead of a Maven or Gradle plugin.