Details
-
Type:
New Feature
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 5.0.4
-
Fix Version/s: 5.x Backlog
-
Component/s: Web
-
Labels:
-
Last commented by a User:true
-
Pull Request URL:
Description
Support specifying defaults for e.g. @RequestMapping via Kotlin parameter default values like so:
@GetMapping fun get(@RequestParam limit: Int = 20)
Such a method should behave equivalent to @RequestMapping with defaultValue, except that the value does not need to be processed by converters, etc.
This can be implemented in org.springframework.web.method.support.InvocableHandlerMethod using Kotlin Reflection (KCallable#callBy), which allows omitting parameters with default values.