@ApiOperation(value = "登陆接口",httpMethod = "POST")
@RequestMapping(value = "/login",method = RequestMethod.POST)
public Boolean login(HttpServletResponse response,@RequestBody User user) {
int i = template.selectOne("login",user);
Cookie cookie = new Cookie("login", "true");
response.addCookie(cookie);
log.info("查询到的结果是"+i); //***log报错
if (i==1) {
log.info("登陆的用户是:"+user.getUserName());
return true;
}
return false;
}