How/Where can I set the relative path location for a packaged (jar) Spring Boot jar application?
The following is what works in my IDE (IntelliJ).
I have in my application.properties file the following properties.
converter.output=upload-dir/output/ converter.input=upload-dir I have a Java class that controls the properties for me.
@Component @ConfigurationProperties("converter") public class ConverterProperties { //getters //setters } I have the following directory structure within the IDE.
src/ target/ upload-dir/ upload-dir/output/ pom.xml README.txt However, I am wanting to know where my upload-dir and upload-dir/output folders would be when I generate a jar and run it from a folder? I have tried putting the folder in the same location as the jar
C:\app\app.jar C:\app\upload-dir\ C:\app\upload-dir\output\ But no dice. I setup the @ConfigurationProperties based on this documentation. https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html, but I can't seem to find anywhere in there were it talks about packaged jar relative paths.