Hide build info from Actuator Info Spring boot

Currently, I’m getting build info and build info from the Actuator/info endpoint. Like

    "git": {
        "commit": {
            "time": "2021-09-01T05:56:49Z",
            "id": "XXXXXX"
        "branch": "task/XXXX-1234-adding-actuator-endpoint"
    "build": {
        "version": "0.0.1-SNAPSHOT",
        "artifact": "XXXXX-XXXX",
        "name": "XXXX---XXXX",
        "group": "no.XXX.XXX",
        "time": "2021-09-01T07:18:23.786Z"

What I need to do is hide build info from this, is that possible with the Gradle actuator for spring-boot? I only need to get git info.


As per this: https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json line 249, It should be as simple as management.info.build.enabled=false in your application.properties.