Commit 77efd6ee authored by hezhen's avatar hezhen

123

parent 6e1e3240
...@@ -447,8 +447,14 @@ public class AppPermissionService { ...@@ -447,8 +447,14 @@ public class AppPermissionService {
} }
public static String getIp() { public static String getIp() {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); try {
return requestAttributes.getRequest().getHeader("userHost"); ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
return requestAttributes.getRequest().getHeader("userHost");
}catch (Exception e){
e.printStackTrace();
return null;
}
} }
/** /**
......
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