Background and description of issue
Raised the question on SO here: https://stackoverflow.com/questions/67994028/startup-endpoint-not-present-in-native-app-using-cnb-and-bufferingapplications?noredirect=1#comment120265314_67994028
@bclozel and @snicoll offered some help (thank you!) and Stephane asked for me to create an issue and link to an example project that reproduces the issue.
Here is the repo: https://github.com/mkheck/spring-boot-actuator-startupendpoint-nativecode-issue
I'm using Boot 2.5.1 (current atm) and the Microsoft OpenJDK (11) when running on JVM. Using Cloud Native Buildpacks for native image.
To reproduce
JVM
- Load project in IDE
- Run from IDE with OpenJDK 11
- Open private browsing session and point to http://localhost:9090/actuator
- Verify /startup endpoint is in list
- Click on /startup endpoint to verify everything loads/is displayed
Native image/container
- From project directory in terminal, run
mvn spring-boot:build-image
- Once it successfully completes, from terminal run
docker run --rm -p 9090:9090 -p 9091:9091 thing2:0.0.1-SNAPSHOT
- Open private browsing session and point to http://localhost:9090/actuator
- Verify /startup endpoint is not present in list
- Refresh browser to verify it still doesn't load
Please let me know if you need anything else (screencaps, etc.) and I'll happily provide them. Results are consistent.
Comment From: snicoll
Thanks Mark for the sample repro. Spring Native issues have to be reported against the relevant project. It's in a different org so I can't unfortunately transfer it. Can you please submit it there?
Comment From: bclozel
I've created spring-projects-experimental/spring-native#851, please follow up there for more information.
Comment From: mkheck
Thank you @bclozel, happy to help ID and resolve anything I can from my end. Best to you!
Comment From: bclozel
The Spring Native issue is now fixed and should be available shortly. If you dont want to depend on SNAPSHOTs for your app, you can temporarily copy/paste the missing hints in your application.
Thanks for your report @mkheck !
Comment From: mkheck
Hi @bclozel, just realized I hadn't responded to this yet, very sorry about that! I've confirmed (by copy/pasting the additional hints into my app) that the fix is successful. Thanks so much, truly appreciate the attention to the issue and its speedy resolution!!