[eclipse][idea]Required String parameter 'xxxxxx' is not present
Required String parameter 'loginAcct' is not present
- 如果将后端的接口注释之后,前端的页面可以访问了的话,同时后端接口也没有拼写问题,网上大多数的解决方式都是将
@RequestParam(value = "xxx")
改为
@RequestParam(value = "loginname",required = false)
如果这样还走的是拦截器的话(还是报错Value for xxxxx cannot be null)
就可以使用如下的解决方式
@RequestParam(value = "xxxx",defaultValue = "")
请注意@RequestParam一般用于接受表单中的内容,而delete使用的是PathVariable来动态的获取映射路径后面的内容