Commit 5b7c052d authored by dongyu's avatar dongyu

获取用户信息修改

parent 79e5a2f2
......@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/resetPwd","/findAccount","/smsLogin","/forgotPassword","/checkUser").anonymous()
.antMatchers("/login", "/register", "/captchaImage","/resetPwd","/findAccount","/smsLogin","/forgotPassword","/checkUser","/category/list/tree").anonymous()
.antMatchers(
HttpMethod.GET,
"/",
......
......@@ -3,6 +3,7 @@ package com.supServer.project.controller;
import com.supServer.common.constant.Constants;
import com.supServer.common.constant.UserConstants;
import com.supServer.framework.security.mode.LoginBody;
import com.supServer.framework.security.mode.LoginUser;
import com.supServer.framework.security.mode.RegisterBody;
import com.supServer.framework.security.mode.SmsLoginBody;
import com.supServer.framework.security.service.TokenService;
......@@ -178,4 +179,14 @@ public class UserController {
}
/*** 获取用户信息
*@Param:
*@return:
*/
@GetMapping("/getInfo")
public AjaxResult getInfo(HttpServletRequest request){
LoginUser user = tokenService.getLoginUser(request);
return AjaxResult.success("操作成功",user);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment