代码语言:javascript复制
String url = request.getScheme() "://"
request.getServerName()
("http".equals(request.getScheme()) && request.getServerPort() == 80 || "https".equals(request.getScheme()) && request.getServerPort() == 443 ? "" : ":" request.getServerPort())
request.getRequestURI()
(request.getQueryString() != null ? "?" request.getQueryString() : "");