获取访问者的IP地址

一、获取访问者的IP地址:

 String sip = "";
            try {
                sip = (String) request.getRemoteAddr();
                System.out.println("IP地址:" + sip);
            } catch (Exception e) {

            }

发布了51 篇原创文章 · 获赞 46 · 访问量 62万+

猜你喜欢

转载自blog.csdn.net/nbxinjian/article/details/86612549