方法如下:
import java.net.URL val url = "/tech/217.html" println(new URL(url).getHost)
输出如下:
www.fashici.com