登录接口增加日志
parent
f611a65475
commit
756a4370d4
|
@ -63,6 +63,7 @@ public class LoginController {
|
|||
@PostMapping("/users/login")
|
||||
public GeneralResult<Map<String, Object>> userLogin(@RequestBody LoginModel loginModel,
|
||||
HttpServletRequest request) {
|
||||
try {
|
||||
log.info("开始执行登录请求");
|
||||
long start;
|
||||
String account = loginModel.getAccount();
|
||||
|
@ -122,6 +123,10 @@ public class LoginController {
|
|||
log.info("删除Redis耗时{}ms", System.currentTimeMillis() - start);
|
||||
log.info("登录请求处理完成");
|
||||
return loginResult;
|
||||
}catch (Exception e){
|
||||
log.error("登录异常",e);
|
||||
return new GeneralResult<>(false,"登录异常:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue