在使用Https协议时,本地服务器运行正常调用,但是将项目部署到阿里云服务上时,报错 sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection 解决方法: 将URL url= new URL(url);改为URL url= new URL(null, ur
转载于:https://blog.csdn.net/yongwoozzang/article/details/83029128 HttpURLConnection x-www-form-urlencoded public static String Post(String httpUrl, String data) {PrintWriter out = null;InputStream r