0

How to give start date as System.currentTimeMillis() for default value in the request param for my controller method? Since this is a variable (requires constant), is there any other way to set this as default value? Like this:

@RequestParam(value = "start", required = false, defaultValue = System.currentTimeMillis() ) long startDate

Harshal Patil
  • 6,659
  • 8
  • 41
  • 57
Milee
  • 1,191
  • 1
  • 11
  • 29
  • 3
    try `@RequestParam(value = "start", required = false, defaultValue = "#{System.currentTimeMillis()}" )` – Jaiwo99 May 17 '17 at 15:54
  • ok this does not give an error but I need to test this end to end if it gives proper values. Thanks though. – Milee May 17 '17 at 18:27

0 Answers0