How to put a directory first on the classpath with Spring Boot?

前端 未结 1 936
-上瘾入骨i
-上瘾入骨i 2021-01-11 14:12

I am building my Spring Boot application using Maven, so I can start it with:

java -jar myjar-1.0-SNAPSHOT.jar --spring.profiles.active=prod
<
1条回答
  •  走了就别回头了
    2021-01-11 14:39

    You can use loader.path but only if the Main-Class is PropertiesLauncher (so it depends how you built the JAR file). Maybe you need to re-build the JAR with packaging=ZIP in the Boot plugin (e.g. docs here)? Can you not set the path to the keystore as a "file:" URL?

    0 讨论(0)
提交回复
热议问题