Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Boot Dashboard + Gradle + Spring Actuator "/info" #298

Open
ericis opened this issue Jul 10, 2018 · 1 comment
Open

Boot Dashboard + Gradle + Spring Actuator "/info" #298

ericis opened this issue Jul 10, 2018 · 1 comment

Comments

@ericis
Copy link

ericis commented Jul 10, 2018

The ./info endpoint is empty when the application is run from Boot Dashboard. However, it is correctly populated when running the bootRun gradle task inside IDE's Gradle Tasks window or via command-line (./gradlew bootRun). The file is properly generated at ./build/resources/main/META-INF/build-info.properties.

I have a feeling this is due to some output directory nonsense that I feel should "just work", but probably have to modify something to get it to work... 👎

  • Windows 10 Pro
  • STS 3.9.4.RELEASE
  • Spring Boot 2.0.3.RELEASE with Actuator
  • Gradle (Wrapper) 4.8.1

Generating build info in ./build.gradle:

springBoot {
    // This statement tells the Gradle Spring Boot plugin to generate a file
    // build/resources/main/META-INF/build-info.properties that is picked up 
    // by Spring Boot to display via /info endpoint.
    // https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/#integrating-with-actuator-build-info
    buildInfo()
}

Related issue: #59

@kdvolder
Copy link
Contributor

The problem is likely that gradle + eclipse + buildship doesn't do these extra build steps implied by the code snippet. STS doesn't really control this, it is ultimately BuildShip's responsibility to integrate gradle with Eclipse and configure projects so that Eclipse workspace builds behave (as much as possible) the same as if you would build a project on the commandline.

I agree though this discrepancy is undesirable.

Also its worth for us to trouble-shoot this a bit to understand / confirm what is really going on. Maybe there is something we can do in STS, or otherwise we can decide if it should be filed as bug against someone else (e.g. BuildShip).

A sample project to reproduce the issue would be helpful if you can attach one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants