Is it possible to have empty RequestParam values use the defaultValue?

后端 未结 5 1887
北海茫月
北海茫月 2020-11-30 20:15

if I have a a request mapping similar to the following:

@RequestMapping(value = \"/test\", method = RequestMethod.POST)
@ResponseBody
public void test(@Reque         


        
5条回答
  •  悲&欢浪女
    2020-11-30 21:13

    This was considered a bug in 2013: https://jira.spring.io/browse/SPR-10180

    and was fixed with version 3.2.2. Problem shouldn't occur in any versions after that and your code should work just fine.

提交回复
热议问题