![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
util
寫、㸔
这个作者很懒,什么都没留下…
展开
-
获取ip地址
获取电脑IP地址private String getIpAddr(ServerHttpRequest request) { HttpHeaders headers = request.getHeaders(); String ip = headers.getFirst("x-forwarded-for");// String ip = request.getHeader("x-forwarded-for"); System.out.println("x-forwa原创 2021-12-14 09:47:41 · 118 阅读 · 0 评论 -
获取ip地址
获取ip地址ip工具类package com.gdsmart.charge.common.web.base.util;import cn.hutool.core.util.StrUtil;import lombok.SneakyThrows;import lombok.extern.slf4j.Slf4j;import javax.servlet.http.HttpServletRequest;import java.net.InetAddress;/** * IP工具类 */@原创 2021-11-02 13:23:20 · 88 阅读 · 0 评论