PathVariable annotation was empty on param 0

来自ling
跳转至: 导航搜索
@RequestMapping(value = "/user/{id}", method = RequestMethod.GET)
User findById(@PathVariable Long id);

-->

@RequestMapping(value = "/user/{id}", method = RequestMethod.GET)
User findById(@PathVariable("id") Long id);