Info Source Example (application.groovy)

    The above config will result in the following JSON response from the info endpoint:

    1. {
    2. "demo": {
    3. "string": "demo string",
    4. "map": {
    5. "other_key": 123
    6. }
    7. }

    Configuration

    If a git.properties file is available on the classpath, the GitInfoSource will expose the values in that file under the key. Generating of a git.properties file will need to be configured as part of your build. One easy option for Gradle users is the . Maven users can look at the Maven Git Commit Id Plugin.

    Configuration

    To specify an alternate path/name of the properties file, you can supply a custom value in the endpoints.info.git.location property.

    If a META-INF/build-info.properties file is available on the classpath, the BuildInfoSource will expose the values in that file under the build key. Generating of a build-info.properties file will need to be configured as part of your build. One easy option for Gradle users is the . Another option for Maven users is the Spring Boot Maven Plugin

    Configuration

    To specify an alternate path/name of the properties file, you can supply a custom value in the property.