Issue
In the actual production and development servers, the base path is set with the code below.
private static String FILE_DIR = System.getProperty("user.dir") + File.separator + "FILES";
I want to move this code to application.properties.
Is there a way to use a path like System.getProperty in application.properties?
Sorry for such a novice question
Solution
I tried the following in application.yml
and it worked.
filedir: ${user.dir}${file.separator}FILES
And then
@Value("${filedir}")
private String fileDir;
Please let me know it it wrks for you.
Answered By - Syed Mainul Hasan
Answer Checked By - David Marino (JavaFixing Volunteer)