缺少EscapeUtil包路径。
This commit is contained in:
parent
c3b5cb20d8
commit
03aef64693
@ -4,6 +4,7 @@ import java.net.InetAddress;
|
|||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.html.EscapeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
@ -40,7 +41,7 @@ public class IpUtils
|
|||||||
{
|
{
|
||||||
ip = request.getRemoteAddr();
|
ip = request.getRemoteAddr();
|
||||||
}
|
}
|
||||||
ip = EscapeUtil.clean(ip);//清除Xss特殊字符
|
ip = EscapeUtil.clean(ip);// 清除Xss特殊字符
|
||||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user