My problem is similar to one described here (I don't override classpath explicitly): Spring application.yml not detected when running with -classpath
I have a SpringBoot application producing executable app.jar built with repackage goal. I have application.yml in root context of backend.jar which is a dependency of app.jar. I can run the app successfully from IDEA via MainClass:
SpringApplication.run(MyApp.class, args);
I can run the app successfully from terminal:
java -jar app.jar
However, the application fails to configure from application.yml when I run it locally as CloudFoundry does:
unzip app.jar
java org.springframework.boot.loader.JarLauncher
Spring will boot up and provide static content but fail at first attempt to access anything that requires data from configuration.
I've read through documentation and I can't figure out what is wrong with the classpath. From MANIFEST.INF I assume java -jar app.jar executes the same class as I do in the third example above.
Thanks for ideas.