Cómo inicia Spring mvc el socket
cadena estática pública getIpAddr(solicitud HttpServletRequest) {
cadena ip = request.getHeader("x-forwarded-for");
if (ip = = nulo || ip.length() == 0 || "desconocido".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = solicitud. getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "desconocido". igual aIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
if (ip.equals("0:0:0:0 :0:0:0:1")) {
ip = "local";
}
if (ip.split(",") .length > 1) {
ip = ip.split(",")[0];
}
return getIpInfo(ip); p>
}