Commit 03ed800a by xieshaohua

格式优化

parent eaf19c72
......@@ -98,7 +98,7 @@ public class LoginManagement {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Mcd-Site", ssoAuthHeader);
String result = sendGetSkipSSL(ssoAuthUrl + "?token=" + ssoToken, headerMap);
log.info("boss用户数据返回:" + JSON.toJSONString(result));
log.info("boss用户数据返回:{}" , JSON.toJSONString(result));
JSONObject resultJb = JSON.parseObject(result);
JSONObject resultData = resultJb.getJSONObject("data");
String userName = resultData.get("employeeNumber") == null ? "" : String.valueOf(resultData.get("employeeNumber"));
......@@ -106,7 +106,7 @@ public class LoginManagement {
String eid = resultData.get("eid") == null ? "" : String.valueOf(resultData.get("eid"));
Map<String, Object> user = getUserByName(userName);
log.info("匹配用户:" + user == null ? "" : JSON.toJSONString(user));
log.info("匹配用户:{}" , user == null ? "" : JSON.toJSONString(user));
if (null == user || CollectionUtils.isEmpty(user)) {
......@@ -120,7 +120,7 @@ public class LoginManagement {
roleMap.put("id", defaultRoleId);
dataRoleAbstracts.add(roleMap);
toAdd.put("dataRoleAbstracts", dataRoleAbstracts);
log.info("新增用户:" + JSON.toJSONString(toAdd));
log.info("新增用户:{}", JSON.toJSONString(toAdd));
authService.addUser(toAdd);
} else if (needUpate(resultJb, user)) {
......@@ -128,7 +128,7 @@ public class LoginManagement {
user.put("name", userName);
user.put("dname", userDName);
user.put("eid", eid);
log.info("更新用户:" + JSON.toJSONString(user));
log.info("更新用户:{}", JSON.toJSONString(user));
authService.updateUser(userId, user);
}
UserDetails userDetails = customizedUserDetailService.loadUserByUsername(userName);
......@@ -202,63 +202,6 @@ public class LoginManagement {
return session.getAttribute(Constants.Session_Lang).toString();
}
@RequestMapping(value = "/test", method = {RequestMethod.POST, RequestMethod.GET})
public String test(HttpServletRequest request) {
UserDetails userDetails = customizedUserDetailService.loadUserByUsername("root");
Cookie[] cookies = request.getCookies();
if (cookies != null) {
log.info("---------cookies------------");
for (Cookie cookie : cookies) {
log.info(cookie.getName() + "----" + cookie.getValue());
}
}
try {
Enumeration<String> headers = request.getHeaderNames();
log.info("---------headers------------");
while (headers.hasMoreElements()) {
String key = headers.nextElement();
log.info(key + "----" + request.getHeader(key));
}
} catch (Exception e) {
e.printStackTrace();
}
try {
HttpSession session = request.getSession();
log.info("---------seesions------------");
Enumeration<String> enumeration = session.getAttributeNames();
while (enumeration.hasMoreElements()) {
String key = enumeration.nextElement();
log.info(key + "----" + session.getAttribute(key));
}
} catch (Exception e) {
e.printStackTrace();
}
try {
Enumeration<String> attributes = request.getAttributeNames();
log.info("---------attributes------------");
while (attributes.hasMoreElements()) {
String key = attributes.nextElement();
log.info(key + "----" + request.getAttribute(key));
}
} catch (Exception e) {
e.printStackTrace();
}
try {
Enumeration<String> params = request.getParameterNames();
log.info("---------params------------");
while (params.hasMoreElements()) {
String key = params.nextElement();
log.info(key + "----" + request.getParameter(key));
}
} catch (Exception e) {
e.printStackTrace();
}
return "test";
}
@RequestMapping(value = "/testBody", method = {RequestMethod.POST, RequestMethod.GET})
public @ResponseBody
......
......@@ -13,9 +13,9 @@ public class OpenAPIConfig {
@Bean
public OpenAPI openAPI() {
Info info = new Info()
.title("标准管理 API文档")
.title("登录管理 API文档")
.version("1.0")
.description("标准管理 API文档");
.description("登录管理 API文档");
return new OpenAPI().info(info);
}
}
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