https://kotlinlang.org logo
#spring
Title
# spring
s

sdeleuze

01/31/2016, 5:01 PM
Hey, I would like to know if using
arrayOf()
is mandatory in Kotlin when I want to set a single value of an annotation array attribute like
@RequestMapping("/", method = arrayOf(RequestMethod.GET))
(method is declared as
RequestMethod[] method() default {}
)? Since Java allows to pass directly a single value, we use this kind of construct a lot in Spring.