public static boolean validUrl(String url) {
    if (StringUtils.isBlank(url)) {
      return false;
    }
    try {
      new URL(url);
      return true;
    } catch (MalformedURLException e) {
      return false;
    }
  }
Get url path, remove parameters.

{@literal "http://www.test.com/v1/user" -> "/v1/user" }
{@literal "/v1/user" --> "/v1/user" }
{@literal "/v1/user?lender=true"-->"/v1/user" }

@param url the invalid url
@return the path of the url
@throws InvalidUrlException if the url is invalid
src/main/java/com/eudemon/ratelimiter/utils/UrlUtils.java