nkiesel
12/06/2019, 1:11 AMfun hello(@QueryParam("greeting") @DefaultValue("hi") greeting: String = "hi")
to get the same default value when called via REST or directly. Is there a way to avoid duplicating the default value?alllex
12/06/2019, 10:21 AMconst val
and then use it in both expressions.
const val HELLO_GREETING_DEF = "hi"
hello(@QueryParam("greeting") @DefaultValue(HELLO_GREETING_DEF) greeting: String = HELLO_GREETING_DEF)