public String login(@RequestParam("username")String username, @RequestParam("password")String password){}
@RequestParam的最大作用就是:明确地告诉controller,这两个参数是从请求参数中获取,一旦没有获取,则报错。
@RequestParam 加在方法上之后 postman测试接口的时候 参数条件查询得必须填充如果没有添加参数查询 则会报错.
public String login(@RequestParam("username")String username, @RequestParam("password")String password){}
@RequestParam的最大作用就是:明确地告诉controller,这两个参数是从请求参数中获取,一旦没有获取,则报错。
@RequestParam 加在方法上之后 postman测试接口的时候 参数条件查询得必须填充如果没有添加参数查询 则会报错.