2

I'm using the Spring Framework (specifically Spring Boot) for the first time, so forgive me if there is an obvious solution to this...

In my application, I have an embedded application.yml which provides defaults to a whole load of configuration parameters. This works fine if I run the JAR using:

java -jar myapp.jar

However, my application has been developed to detect additional components on the classpath, meaning I need to run the following command instead:

java -classpath .;myapp.jar;extra/* org.springframework.boot.loader.JarLauncher

When running it like this, the embedded application.yml isn't detected and therefore my configuration parameters aren't given default values.

Can anyone explain what is causing this, and how I can get around the issue?

James Baker
  • 1,143
  • 17
  • 39

1 Answers1

0

I'm not sure I entirely understand why, but in case anyone else hits this issue I found the following works fine (note the lack of a . in the classpath):

java -classpath myapp.jar;extra/* org.springframework.boot.loader.JarLauncher
James Baker
  • 1,143
  • 17
  • 39