1

enter image description here

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.

M. Deinum
  • 115,695
  • 22
  • 220
  • 224
Rahul
  • 111
  • 3
  • 13
  • 2
    https://stackoverflow.com/questions/41597748/add-timestamp-variable-to-folder-path-value-in-application-properties – Karl S. Jun 29 '21 at 18:37

1 Answers1

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