Skip to content
Advertisement

Failed Autowired of BuildProperties Spring Boot 2.1.5 & eclipse

I’m creating a very simple application with a few REST API’s and it’s currently working correctly until I try to use the BuildProperties on my health check API. While starting my application I get the following error:

JavaScript

I went to the build file and I also looked in the jar file created by the build and I see the build-info.properties is in fact there. In the jar file the path to the file is “BOOT-INFclassesMETA-INF”. I also have other “Autowired” elements that are not having issues.

Where my code fails:

JavaScript

My gradle build file:

JavaScript

build-info.properties:

JavaScript

Advertisement

Answer

As @Borislav Markov suggested I tried running it via command line and it seems to work perfectly regardless if I use JDK 12 or JDK 8. I think the issue has to do with the eclipse plugin I am using to run the application via the IDE.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement