提交 d6fd6e20 authored 作者: 000516's avatar 000516

添加从header中获取登录用户的配置;获取登录人姓名

上级 ecfcd41f
......@@ -42,6 +42,10 @@ public class SecurityConstants
* 登录用户
*/
public static final String LOGIN_USER = "login_user";
/**
* 登录用户明细
*/
public static final String SYS_USER = "sysUser";
/**
* 角色权限
......
......@@ -106,6 +106,6 @@ public class SecurityContextHolder
public static String getNickName() {
JSONObject userJson = getJsonObject(SecurityConstants.LOGIN_USER);
return userJson.getString(SecurityConstants.DETAILS_NICKNAME);
return userJson.getJSONObject(SecurityConstants.SYS_USER).getString(SecurityConstants.DETAILS_NICKNAME);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论