oskarh
11/14/2017, 11:03 AM@RequestParam
of type Int
, but get
"Optional int parameter 'p' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type."
Any way I can force Kotlin to use the wrapper class Integer instead of the primitive type?Czar
11/14/2017, 11:04 AMInt?
oskarh
11/14/2017, 11:06 AMoskarh
11/14/2017, 11:06 AMoskarh
11/14/2017, 11:06 AMCzar
11/14/2017, 11:11 AMInt
to avoid elvis, but instead of Kotlin default value you have to use @RequestParam(name="blabla", required=false, defaultValue="yourDefault")
oskarh
11/14/2017, 12:12 PM