2021
11-17
11-17
springboot 获取访问接口的请求的IP地址的实现
工具类:importjavax.servlet.http.HttpServletRequest;importjava.net.InetAddress;importjava.net.UnknownHostException;/***@Author:JCccc*@CreateTime:2018-11-23*@Description:*@Point:Keepagoodmood**/publicclassIpUtil{publicstaticStringgetIpAddr(HttpServletRequestrequest){StringipAddress=null;try{ipAddress=request.getHeader("x-forwarded-...
继续阅读 >