public static String doPostToken(String tokenUrl,String clientId,String clientSecret,String grantType) { CloseableHttpResponse response = null; String resultToken = ""; try { //1.创建Httpclient对象 CloseableHttpClient httpClient = HttpClients.createDefault(); //2.创建Http Post请求 HttpPost httpPost = new HttpPost(tokenUrl); //3.封装请求参数 List<BasicNameValuePair> list = new ArrayList<>(); list.add(new BasicNameValuePair("client_id", clientId)); list.add(new BasicNameValuePair("client_secret", clientSecret)); list.add(new BasicNameValuePair("grant_type", grantType)); httpPost.setEntity(new