sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection 异常的处理
在使用
URL url = new URL(url);
的时候,如果url是https的时候,使用
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
这个会异常,
这个时候,就需要对:url= new URL 进行处理了。
解决如下:
https://www.xuebuyuan.com/2097844.html