Skip to content

Commit acbe18c

Browse files
committed
Merge branch '2.4.x'
Closes gh-24571
2 parents 8a67ab0 + c231f3d commit acbe18c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,6 +2600,8 @@ Gradle users can achieve the same result by using the https://plugins.gradle.org
26002600
}
26012601
----
26022602

2603+
Both the Maven and Gradle plugins allow the properties that are included in `git.properties` to be configured.
2604+
26032605
TIP: The commit time in `git.properties` is expected to match the following format: `yyyy-MM-dd'T'HH:mm:ssZ`.
26042606
This is the default format for both plugins listed above.
26052607
Using this format lets the time be parsed into a `Date` and its format, when serialized to JSON, to be controlled by Jackson's date serialization configuration settings.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,11 +1177,13 @@ Assuming you use Maven, you could rewrite the preceding example as follows:
11771177
[[production-ready-application-info-git]]
11781178
==== Git Commit Information
11791179
Another useful feature of the `info` endpoint is its ability to publish information about the state of your `git` source code repository when the project was built.
1180-
If a `GitProperties` bean is available, the `git.branch`, `git.commit.id`, and `git.commit.time` properties are exposed.
1180+
If a `GitProperties` bean is available, the `info` endpoint can be used to expose these properties.
11811181
11821182
TIP: A `GitProperties` bean is auto-configured if a `git.properties` file is available at the root of the classpath.
11831183
See "<<howto.adoc#howto-git-info,Generate git information>>" for more details.
11841184
1185+
By default, the endpoint exposes `git.branch`, `git.commit.id`, and `git.commit.time` properties, if present.
1186+
If you don't want any of these properties in the endpoint response, they need to be excluded from the `git.properties` file.
11851187
If you want to display the full git information (that is, the full content of `git.properties`), use the configprop:management.info.git.mode[] property, as follows:
11861188
11871189
[source,yaml,indent=0,configprops,configblocks]

0 commit comments

Comments
 (0)