private String getDomain(String destination){
     
        if(destination==null||destination.trim().equals("")){
     
         return "";
     
        }
     
        String domain = "";
     
        URL url =null;
     
        try {
     
            url= new URL(destination);
     
            domain =url.getProtocol()+"://"+url.getHost();
     
        } catch (MalformedURLException e) {
     
            LOG.info("url=["+destination+"] not correct! ");;
     
        }
     
        return domain;
     
       }

 

相关文章:

  • 2021-08-16
  • 2021-06-20
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2021-08-11
猜你喜欢
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
相关资源
相似解决方案