I have one variable in application.properties
file 'footer_note' and now I want to store current date value in this variable but unable to do this.
I can do this in my Java code but requirement is to store that current date value in application.properties
file and fetch from there and display it.
Asked
Active
Viewed 1,845 times
1
-
2https://stackoverflow.com/questions/41597748/add-timestamp-variable-to-folder-path-value-in-application-properties – Karl S. Jun 29 '21 at 18:37
1 Answers
1
You can set before springRun in main method.
public static void main(String[] args) {
System.setProperty("footer.note",String.valueOf(System.currentTimeMillis()));
new SpringApplicationBuilder()....
}

Lucas Costa
- 99
- 11