diff --git a/.classpath b/.classpath deleted file mode 100644 index ff682ca..0000000 --- a/.classpath +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.project b/.project deleted file mode 100644 index 88581b2..0000000 --- a/.project +++ /dev/null @@ -1,37 +0,0 @@ - - - Tesweibo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope deleted file mode 100644 index e945e4e..0000000 --- a/.settings/.jsdtscope +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 1ab2bb5..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 14b697b..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component deleted file mode 100644 index dbf442d..0000000 --- a/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml deleted file mode 100644 index 3961d3b..0000000 --- a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index c60895b..0000000 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index 6f1cba6..0000000 --- a/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,2 +0,0 @@ -disabled=06target -eclipse.preferences.version=1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..af9fe0b --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# weiboAuth +微博第三方登陆 java maven项目 + +项目使用servlet版本,可以自行升级成自己想要的。 + +需要用户自行修改的: + +Constants.java 中的部分常量 + +建议: + +建议把 QueryWeiBo.java 下的 getAccessToken()、getUserInfo() 封装为工具类 +常量加载到容器的配置中,我这只是配置 + + + diff --git a/pom.xml b/pom.xml index bedca3f..047cc62 100644 --- a/pom.xml +++ b/pom.xml @@ -1,13 +1,17 @@ 4.0.0 - cn.kgc.tangcco.tcmp073.zhangshuaike - Tesweibo - 0.0.1-SNAPSHOT + cn.keshaowl + weibo-auth + 1.0 war - - - + + UTF-8 + 1.8 + 1.8 + + + javax @@ -15,71 +19,44 @@ 7.0 provided - + org.apache.commons commons-lang3 3.1 - + - net.sf.json-lib - json-lib - 2.3 - jdk15 + cn.hutool + hutool-http + 5.7.19 - - - + com.alibaba fastjson - 1.2.44 + 1.2.75 - - - jstl jstl 1.2 - + + junit junit 4.12 test - - mysql - mysql-connector-java - 5.1.44 - - - com.mchange - c3p0 - 0.9.5.2 - - - - - com.belerweb - weibo4j-oauth2 - 2.1.1-beta2-3 - - - - log4j log4j 1.2.9 - - diff --git a/src/main/java/com/zhangshuaike/action/DoLoginServlet.java b/src/main/java/com/zhangshuaike/action/DoLoginServlet.java index 692bbe6..44c5d23 100644 --- a/src/main/java/com/zhangshuaike/action/DoLoginServlet.java +++ b/src/main/java/com/zhangshuaike/action/DoLoginServlet.java @@ -1,36 +1,28 @@ package com.zhangshuaike.action; +import com.zhangshuaike.constatns.Constants; + import java.io.IOException; -import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import weibo4j.Oauth; -import weibo4j.model.WeiboException; -@WebServlet(name="DoLoginServlet",urlPatterns="/dologin.do") +/** + * 处理用户登录微博的请求,带着用户去登录 + *

注意,此url生成的链接可以完全写死前端,给后端是给部分定制化业务的开发去使用

+ * + * @author : 张帅轲 + * @version : 1.0 + * @date : 2021/04/08 + */ +@WebServlet(name = "DoLoginServlet", urlPatterns = "/dologin.do") public class DoLoginServlet extends HttpServlet { - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - Oauth oauth = new Oauth(); - String url = null; - try { - url = oauth.authorize("code", null); - } catch (WeiboException e) { - e.printStackTrace(); - } - response.sendRedirect(url); - - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - this.doGet(request, response); - } - + @Override + protected void service(HttpServletRequest req, HttpServletResponse resp) throws IOException { + //redirect login url + resp.sendRedirect(Constants.URL); + } } diff --git a/src/main/java/com/zhangshuaike/action/QueryWeiBo.java b/src/main/java/com/zhangshuaike/action/QueryWeiBo.java index 3c95d0e..a5553a6 100644 --- a/src/main/java/com/zhangshuaike/action/QueryWeiBo.java +++ b/src/main/java/com/zhangshuaike/action/QueryWeiBo.java @@ -1,7 +1,6 @@ package com.zhangshuaike.action; import java.io.IOException; -import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; @@ -9,140 +8,82 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.json.JSONException; -import org.json.JSONObject; - -import com.alibaba.fastjson.TypeReference; -import com.zhangshuaike.utils.HttpsUtil; - -import weibo4j.Account; -import weibo4j.Oauth; -import weibo4j.Users; -import weibo4j.http.AccessToken; -import weibo4j.model.User; -import weibo4j.model.WeiboException; - - -@WebServlet(name = "QueryWeiBo", urlPatterns = "/auto.do") +import cn.hutool.http.HttpUtil; +import com.alibaba.fastjson.JSONObject; +import com.zhangshuaike.constatns.Constants; + +/** + * 微博相关控制层,优化版本 + * + * @author : 张帅轲 + * @version : 1.0 + * @date : 2021/04/08 + */ +@WebServlet(name = "QueryWeiBo", urlPatterns = "/auth.do") public class QueryWeiBo extends HttpServlet { - private final static String CLIENT_ID = ""; - private final static String CLIENT_SERCRET = ""; - private final static String GET_TOKEN_URL = "https://api.weibo.com/oauth2/access_token"; - private final static String REDIRECT_URI = ""; - private final static String GET_USER_INFO = "https://api.weibo.com/2/users/show.json"; - private final static String GET_TOKEN_INFO_URL = "https://api.weibo.com/oauth2/get_token_info"; - private final static String STATE = "register"; - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/html;charset=UTF-8"); - // 获取code - String code = request.getParameter("code"); - String access_token = ""; - String expires_in = ""; - String uid = ""; - - // 获取token - JSONObject token = null; - try { - token = getAccessToken(code); - } catch (JSONException e) { - e.printStackTrace(); - } - try { - access_token = token.getString("access_token"); - } catch (JSONException e1) { - e1.printStackTrace(); - } - try { - uid = token.getString("uid"); - System.out.println(uid); - } catch (JSONException e) { - e.printStackTrace(); - } - try { - expires_in = String.valueOf(token.getInt("expires_in")); - System.out.println(expires_in); - } catch (JSONException e) { - e.printStackTrace(); - } - - // 获取用户信息 - JSONObject userInfo = null; - try { - userInfo = getUserInfo(access_token, uid); - request.setAttribute("userInfo", userInfo); - } catch (JSONException e) { - e.printStackTrace(); - } - try { - String nickname = userInfo.getString("screen_name"); - request.setAttribute("nickname", nickname); - } catch (JSONException e) { - e.printStackTrace(); - } - try { - String profile_image_url = userInfo.getString("profile_image_url"); - request.setAttribute("profile_image_url", profile_image_url); - } catch (JSONException e) { - e.printStackTrace(); - } - try { - String gender = "f".equals(userInfo.getString("gender")) ? "1" : "0"; - request.setAttribute("gender", gender); - } catch (JSONException e) { - e.printStackTrace(); - } - - request.getRequestDispatcher("auth.jsp").forward(request, response); - - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - this.doGet(request, response); - } - - /** - * 获取AccessToken - * - * @throws JSONException - */ - private JSONObject getAccessToken(String code) throws JSONException { - StringBuilder sb = new StringBuilder(); - sb.append("grant_type=authorization_code"); - sb.append("&client_id=" + CLIENT_ID); - sb.append("&client_secret=" + CLIENT_SERCRET); - sb.append("&redirect_uri=" + REDIRECT_URI); - sb.append("&code=" + code); - String result = HttpsUtil.post(GET_TOKEN_URL, sb.toString()); - /** - * 返回数据 { "access_token": "ACCESS_TOKEN", "expires_in": 1234, - * "remind_in":"798114", "uid":"12341234" } - */ - JSONObject json = new JSONObject(result); - return json; - } - - /** - * 获取用户信息 - * - * @param access_token - * @param uid - * 查询的用户ID - * @return - * @throws JSONException - */ - private JSONObject getUserInfo(String access_token, String uid) throws JSONException { - StringBuilder sb = new StringBuilder(); - sb.append("?access_token=" + access_token); - sb.append("&uid=" + uid); - String result = HttpsUtil.get(GET_USER_INFO + sb.toString()); - // 返回参数:查看http://open.weibo.com/wiki/2/users/show - JSONObject json = new JSONObject(result); - return json; - } -} \ No newline at end of file + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + // 获取code + String code = request.getParameter("code"); + //定义token以及失效时间等 + String accessToken, expiresIn, uid; + // 获取token,获取用户信息 + JSONObject token, userInfo; + //获取token + token = getAccessToken(code); + accessToken = token.getString("access_token"); + uid = token.getString("uid"); + expiresIn = token.getString("expires_in"); + + // 获取用户信息 + userInfo = getUserInfo(accessToken, uid); + String nickname = userInfo.getString("screen_name"); + String profileImageUrl = userInfo.getString("profile_image_url"); + String gender = "f".equals(userInfo.getString("gender")) ? "1" : "0"; + //如果是springmvc,推荐使用ModelMap + request.setAttribute("gender", gender); + request.setAttribute("userInfo", userInfo); + request.setAttribute("nickname", nickname); + request.setAttribute("profile_image_url", profileImageUrl); + request.setAttribute("expires_in", expiresIn); + request.getRequestDispatcher("auth.jsp").forward(request, response); + } + + /** + * 获取AccessToken + * + * @param code 微博返回临时获取token令牌 + * @return 返回数据 { "access_token": "ACCESS_TOKEN", "expires_in": 1234, "remind_in":"798114","uid":"12341234" } + */ + private JSONObject getAccessToken(String code) { + String params = + "grant_type=authorization_code" + + "&client_id=" + + Constants.CLIENT_ID + + "&client_secret=" + + Constants.CLIENT_SECRET + + "&redirect_uri=" + + Constants.REDIRECT_URI + + "&code=" + + code; + //得到本次请求服务器结果 + String result = HttpUtil.post(Constants.GET_TOKEN_URL, params); + return JSONObject.parseObject(result); + } + + /** + * 获取用户信息 + * + * @param accessToken 临时授权访问资源的token + * @param uid 查询的用户ID + * @return UserInfo JSON 返回参数:查看http://open.weibo.com/wiki/2/users/show + */ + private JSONObject getUserInfo(String accessToken, String uid) { + String params = "?access_token=" + accessToken + "&uid=" + uid; + String result = HttpUtil.get(Constants.GET_USER_INFO + params); + return JSONObject.parseObject(result); + } +} diff --git a/src/main/java/com/zhangshuaike/constatns/Constants.java b/src/main/java/com/zhangshuaike/constatns/Constants.java new file mode 100644 index 0000000..84bec5d --- /dev/null +++ b/src/main/java/com/zhangshuaike/constatns/Constants.java @@ -0,0 +1,37 @@ +package com.zhangshuaike.constatns; + +/** + * 微博登录demo项目相关常用常量类 + * + * @author : 张帅轲 + * @version : 1.0 + * @date : 2021/4/8 10:05 + */ +public class Constants { + + /** + * app id + */ + public static final String CLIENT_ID = "3442370524"; + + /** + * app secret + * + * 此密钥已进行重置,请申请您自己的密钥进行 + */ + public static final String CLIENT_SECRET = ""; + + /** + * redirect_uri + */ + public static final String REDIRECT_URI = "http://127.0.0.1:8080/auth.do"; + + public static final String GET_TOKEN_URL = "https://api.weibo.com/oauth2/access_token"; + public static final String GET_USER_INFO = "https://api.weibo.com/2/users/show.json"; + /** + * weibo auth URL + */ + public static final String URL = + "https://api.weibo.com/oauth2/authorize?client_id="+CLIENT_ID+"&response_type=code&redirect_uri="+REDIRECT_URI; + +} diff --git a/src/main/java/com/zhangshuaike/utils/HttpsUtil.java b/src/main/java/com/zhangshuaike/utils/HttpsUtil.java deleted file mode 100644 index 79ec964..0000000 --- a/src/main/java/com/zhangshuaike/utils/HttpsUtil.java +++ /dev/null @@ -1,564 +0,0 @@ -package com.zhangshuaike.utils; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLEncoder; -import java.security.SecureRandom; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.KeyManager; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -import org.apache.commons.lang3.StringUtils; -/** - * 请求的工具类 - * @author shuaike - * - */ -public class HttpsUtil { - /** - * post请求方法 - */ - private static final String METHOD_POST = "POST"; - - /** - * utf-8编码格式 - */ - private static final String DEFAULT_CHARSET = "utf-8"; - - /** - * doPost - * - * @param url - * 请求地址 - * @param params - * 请求参数 - * @param charset - * 编码 - * @param ctype - * 类型 - * @param connectTimeout - * 连接超时时间 - * @param readTimeout - * 读取超时时间 - * @return 结果 - * @throws Exception - * 异常 - */ - public static String doPost(String url, String params, String charset, String ctype, int connectTimeout, - int readTimeout) throws Exception { - charset = (charset == null || "".equals(charset)) ? DEFAULT_CHARSET : charset; - byte[] content = {}; - if (params != null) { - content = params.getBytes(charset); - } - return doPost(url, ctype, content, connectTimeout, readTimeout); - } - - /** - * doPost - * - * @param url - * 请求地址 - * @param ctype - * 类型 - * @param content - * 内容 - * @param connectTimeout - * 连接超时时间 - * @param readTimeout - * 读取超时时间 - * @return 结果 - * @throws Exception - * 异常 - */ - public static String doPost(String url, String ctype, byte[] content, int connectTimeout, int readTimeout) - throws Exception { - HttpsURLConnection conn = null; - OutputStream out = null; - String rsp = null; - try { - try { - SSLContext ctx = SSLContext.getInstance("TLS"); - ctx.init(new KeyManager[0], new TrustManager[] { new DefaultTrustManager() }, new SecureRandom()); - SSLContext.setDefault(ctx); - - conn = getConnection(new URL(url), METHOD_POST, ctype); - conn.setHostnameVerifier(new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - conn.setConnectTimeout(connectTimeout); - conn.setReadTimeout(readTimeout); - } catch (Exception e) { - // log.error("GET_CONNECTOIN_ERROR, URL = " + url, e); - throw e; - } - try { - out = conn.getOutputStream(); - out.write(content); - rsp = getResponseAsString(conn); - } catch (IOException e) { - // log.error("REQUEST_RESPONSE_ERROR, URL = " + url, e); - throw e; - } - - } finally { - if (out != null) { - out.close(); - } - if (conn != null) { - conn.disconnect(); - } - } - - return rsp; - } - - private static class DefaultTrustManager implements X509TrustManager { - - @Override - public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { - } - - @Override - public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - } - - /** - * 获取连接 - * - * @param url - * 请求地址 - * @param method - * 请求方法 - * @param ctype - * 类型 - * @return HttpsURLConnection - * @throws IOException - * 异常 - */ - private static HttpsURLConnection getConnection(URL url, String method, String ctype) throws IOException { - HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); - conn.setRequestMethod(method); - conn.setDoInput(true); - conn.setDoOutput(true); - conn.setRequestProperty("Accept", "text/xml,text/javascript,text/html"); - conn.setRequestProperty("User-Agent", "stargate"); - conn.setRequestProperty("Content-Type", ctype); - return conn; - } - - /** - * getResponseAsString - * - * @param conn - * conn连接 - * @return String - * @throws IOException - * IOException - */ - protected static String getResponseAsString(HttpURLConnection conn) throws IOException { - String charset = getResponseCharset(conn.getContentType()); - InputStream es = conn.getErrorStream(); - if (es == null) { - return getStreamAsString(conn.getInputStream(), charset); - } else { - String msg = getStreamAsString(es, charset); - if (StringUtils.isEmpty(msg)) { - throw new IOException(conn.getResponseCode() + ":" + conn.getResponseMessage()); - } else { - throw new IOException(msg); - } - } - } - - /** - * getStreamAsString - * - * @param stream - * stream - * @param charset - * charset - * @return String - * @throws IOException - * IOException - */ - private static String getStreamAsString(InputStream stream, String charset) throws IOException { - try { - BufferedReader reader = new BufferedReader(new InputStreamReader(stream, charset)); - StringWriter writer = new StringWriter(); - - char[] chars = new char[256]; - int count = 0; - while ((count = reader.read(chars)) > 0) { - writer.write(chars, 0, count); - } - - return writer.toString(); - } finally { - if (stream != null) { - stream.close(); - } - } - } - - /** - * getResponseCharset - * - * @param ctype - * ctype - * @return String - */ - private static String getResponseCharset(String ctype) { - String charset = DEFAULT_CHARSET; - - if (!StringUtils.isEmpty(ctype)) { - String[] params = ctype.split(";"); - for (String param : params) { - param = param.trim(); - if (param.startsWith("charset")) { - String[] pair = param.split("=", 2); - if (pair.length == 2) { - if (!StringUtils.isEmpty(pair[1])) { - charset = pair[1].trim(); - } - } - break; - } - } - } - return charset; - } - - private static class TrustAnyHostnameVerifier implements HostnameVerifier { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - } - - /** - * doGet - * - * @param url - * 请求地址 - * @param keyValueParams - * 参数 - * @param cypt - * cypt - * @return String - * @throws Exception - * Exception - */ - public static String doGet(String url, Map keyValueParams, String cypt) throws Exception { - String result = ""; - BufferedReader in = null; - try { - - String urlStr = url + "?" + getParamStr(keyValueParams); - // System.out.println("GET请求的URL为:"+urlStr); - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, new TrustManager[] { new DefaultTrustManager() }, new java.security.SecureRandom()); - URL realUrl = new URL(urlStr); - // 打开和URL之间的连接 - HttpsURLConnection connection = (HttpsURLConnection) realUrl.openConnection(); - // 设置https相关属性 - connection.setSSLSocketFactory(sc.getSocketFactory()); - connection.setHostnameVerifier(new TrustAnyHostnameVerifier()); - connection.setDoOutput(true); - - // 设置通用的请求属性 - connection.setRequestProperty("accept", "*/*"); - connection.setRequestProperty("Content-type", cypt); - connection.setRequestProperty("connection", "Keep-Alive"); - connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); - // 建立实际的连接 - connection.connect(); - - // 定义 BufferedReader输入流来读取URL的响应 - in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); - String line; - while ((line = in.readLine()) != null) { - result += line; - } - // System.out.println("获取的结果为:"+result); - } catch (Exception e) { - // System.out.println("发送GET请求出现异常!" + e); - // e.printStackTrace(); - throw e; - } - // 使用finally块来关闭输入流 - finally { - try { - if (in != null) { - in.close(); - } - } catch (Exception e2) { - // e2.printStackTrace(); - throw e2; - } - } - return result; - } - - /** - * 转化字符串参数 - * - * @param params - * 参数 - * @return String - */ - public static String getParamStr(Map params) { - String paramStr = StringUtils.EMPTY; - if (null == params || 0 == params.size()) { - return paramStr; - } - // 获取参数列表组成参数字符串 - for (String key : params.keySet()) { - paramStr += key + "=" + params.get(key) + "&"; - } - // 去除最后一个"&" - return paramStr.substring(0, paramStr.length() - 1); - } - - /** - * 解析出url参数中的键值对 如 "index.jsp?Action=del&id=123",解析出Action:del,id:123存入map中 - * - * @param url - * url地址 - * @return url请求参数部分 - * @author lzf - */ - public static Map getUrlParam(String url) { - // 初始化返回 - Map params = new HashMap(); - if (StringUtils.isBlank(url)) { - return params; - } - // - String strUrlParam = truncateUrl(url); - if (StringUtils.isBlank(strUrlParam)) { - return params; - } - String[] arrSplit = strUrlParam.split("[&]"); - for (String strSplit : arrSplit) { - String[] arrSplitEqual = strSplit.split("[=]"); - // 解析出键值 - if (arrSplitEqual.length > 1) { - // 正确解析 - params.put(arrSplitEqual[0], arrSplitEqual[1]); - } else { - if (!"".equals(arrSplitEqual[0])) { - // 只有参数没有值,也加入 - params.put(arrSplitEqual[0], ""); - } - } - } - return params; - } - - /** - * 去掉url中的路径,留下请求参数部分 - * - * @param url - * url地址 - * @return url - * @author lzf - */ - private static String truncateUrl(String url) { - String strAllParam = null; - String[] arrSplit = null; - url = url.trim(); - arrSplit = url.split("[?]"); - if (url.length() > 1) { - if (arrSplit.length > 1) { - for (int i = 1; i < arrSplit.length; i++) { - strAllParam = arrSplit[i]; - } - } - } - return strAllParam; - } - - - - - /** - * HTTPS 的get 请求 - * @param url - * @return - */ - public static String get(String url) { - StringBuffer bufferRes = null; - try { - TrustManager[] tm = { new MyX509TrustManager() }; - SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); - sslContext.init(null, tm, new java.security.SecureRandom()); - // 从上述SSLContext对象中得到SSLSocketFactory对象 - SSLSocketFactory ssf = sslContext.getSocketFactory(); - - URL urlGet = new URL(url); - HttpsURLConnection http = (HttpsURLConnection) urlGet.openConnection(); - // 连接超时 - http.setConnectTimeout(25000); - // 读取超时 --服务器响应比较慢,增大时间 - http.setReadTimeout(25000); - http.setRequestMethod("GET"); - http.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); - http.setSSLSocketFactory(ssf); - http.setDoOutput(true); - http.setDoInput(true); - http.connect(); - - InputStream in = http.getInputStream(); - BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET)); - String valueString = null; - bufferRes = new StringBuffer(); - while ((valueString = read.readLine()) != null){ - bufferRes.append(valueString); - } - in.close(); - if (http != null) { - // 关闭连接 - http.disconnect(); - } - return bufferRes.toString(); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - /** - * get请求https - * @param url - * @param params - * @return - */ - public static String get(String url, Map params) { - return get(initParams(url, params)); - } - - /** - * HTTPS 的POST 请求 - * @param url - * @param params - * @return - */ - public static String post(String url, String params) { - StringBuffer bufferRes = null; - try { - TrustManager[] tm = { new MyX509TrustManager() }; - SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); - sslContext.init(null, tm, new java.security.SecureRandom()); - // 从上述SSLContext对象中得到SSLSocketFactory对象 - SSLSocketFactory ssf = sslContext.getSocketFactory(); - - - URL urlGet = new URL(url); - HttpsURLConnection http = (HttpsURLConnection) urlGet.openConnection(); - // 连接超时 - http.setConnectTimeout(25000); - // 读取超时 --服务器响应比较慢,增大时间 - http.setReadTimeout(25000); - http.setRequestMethod("POST"); - http.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); - http.setSSLSocketFactory(ssf); - http.setDoOutput(true); - http.setDoInput(true); - http.connect(); - - - OutputStream out = http.getOutputStream(); - out.write(params.getBytes("UTF-8")); - out.flush(); - out.close(); - - - InputStream in = http.getInputStream(); - BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET)); - String valueString = null; - bufferRes = new StringBuffer(); - while ((valueString = read.readLine()) != null){ - bufferRes.append(valueString); - } - in.close(); - if (http != null) { - // 关闭连接 - http.disconnect(); - } - return bufferRes.toString(); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - - /** - * 构造请求参数 - * @param url - * @param params - * @return - */ - public static String initParams(String url, Map params){ - if (null == params || params.isEmpty()) { - return url; - } - StringBuilder sb = new StringBuilder(url); - if (url.indexOf("?") == -1) { - sb.append("?"); - } else { - sb.append("&"); - } - boolean first = true; - for (Entry entry : params.entrySet()) { - if (first) { - first = false; - } else { - sb.append("&"); - } - String key = entry.getKey(); - String value = entry.getValue(); - sb.append(key).append("="); - if (StringUtils.isNotEmpty(value)) { - try { - sb.append(URLEncoder.encode(value, DEFAULT_CHARSET)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - } - return sb.toString(); - } -} - - - diff --git a/src/main/java/com/zhangshuaike/utils/JsonUtil.java b/src/main/java/com/zhangshuaike/utils/JsonUtil.java deleted file mode 100644 index 9d2610f..0000000 --- a/src/main/java/com/zhangshuaike/utils/JsonUtil.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.zhangshuaike.utils; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import net.sf.ezmorph.MorpherRegistry; -import net.sf.ezmorph.object.DateMorpher; -import net.sf.json.JSONArray; -import net.sf.json.JSONObject; -import net.sf.json.JsonConfig; -import net.sf.json.processors.JsonValueProcessor; -import net.sf.json.util.JSONUtils; -import net.sf.json.xml.XMLSerializer; -/** - * json转换的工具类 - * @author shuaike - * - */ -public class JsonUtil { - - - /** - * 从json串转换成实体对象 - * @param jsonObjStr e.g. {'name':'get','dateAttr':'2009-11-12'} - * @param clazz Person.class - * @return - */ - public static Object getDtoFromJsonObjStr(String jsonObjStr, Class clazz) { - return JSONObject.toBean(JSONObject.fromObject(jsonObjStr), clazz); - } - - /** - * 从json串转换成实体对象,并且实体集合属性存有另外实体Bean - * @param jsonObjStr e.g. {'data':[{'name':'get'},{'name':'set'}]} - * @param clazz e.g. MyBean.class - * @param classMap e.g. classMap.put("data", Person.class) - * @return Object - */ - public static Object getDtoFromJsonObjStr(String jsonObjStr, Class clazz, Map classMap) { - return JSONObject.toBean(JSONObject.fromObject(jsonObjStr), clazz, classMap); - } - - /** - * 把一个json数组串转换成普通数组 - * @param jsonArrStr e.g. ['get',1,true,null] - * @return Object[] - */ - public static Object[] getArrFromJsonArrStr(String jsonArrStr) { - return JSONArray.fromObject(jsonArrStr).toArray(); - } - - /** - * 把一个json数组串转换成实体数组 - * @param jsonArrStr e.g. [{'name':'get'},{'name':'set'}] - * @param clazz e.g. Person.class - * @return Object[] - */ - public static Object[] getDtoArrFromJsonArrStr(String jsonArrStr, Class clazz) { - JSONArray jsonArr = JSONArray.fromObject(jsonArrStr); - Object[] objArr = new Object[jsonArr.size()]; - for (int i = 0; i < jsonArr.size(); i++) { - objArr[i] = JSONObject.toBean(jsonArr.getJSONObject(i), clazz); - } - return objArr; - } - - /** - * 把一个json数组串转换成实体数组,且数组元素的属性含有另外实例Bean - * @param jsonArrStr e.g. [{'data':[{'name':'get'}]},{'data':[{'name':'set'}]}] - * @param clazz e.g. MyBean.class - * @param classMap e.g. classMap.put("data", Person.class) - * @return Object[] - */ - public static Object[] getDtoArrFromJsonArrStr(String jsonArrStr, Class clazz, - Map classMap) { - JSONArray array = JSONArray.fromObject(jsonArrStr); - Object[] obj = new Object[array.size()]; - for (int i = 0; i < array.size(); i++) { - JSONObject jsonObject = array.getJSONObject(i); - obj[i] = JSONObject.toBean(jsonObject, clazz, classMap); - } - return obj; - } - - /** - * 把一个json数组串转换成存放普通类型元素的集合 - * @param jsonArrStr e.g. ['get',1,true,null] - * @return List - */ - public static List getListFromJsonArrStr(String jsonArrStr) { - JSONArray jsonArr = JSONArray.fromObject(jsonArrStr); - List list = new ArrayList(); - for (int i = 0; i < jsonArr.size(); i++) { - list.add(jsonArr.get(i)); - } - return list; - } - - /** - * 把一个json数组串转换成集合,且集合里存放的为实例Bean - * @param jsonArrStr e.g. [{'name':'get'},{'name':'set'}] - * @param clazz - * @return List - */ - public static List getListFromJsonArrStr(String jsonArrStr, Class clazz) { - JSONArray jsonArr = JSONArray.fromObject(jsonArrStr); - List list = new ArrayList(); - for (int i = 0; i < jsonArr.size(); i++) { - list.add(JSONObject.toBean(jsonArr.getJSONObject(i), clazz)); - } - return list; - } - - /** - * 把一个json数组串转换成集合,且集合里的对象的属性含有另外实例Bean - * @param jsonArrStr e.g. [{'data':[{'name':'get'}]},{'data':[{'name':'set'}]}] - * @param clazz e.g. MyBean.class - * @param classMap e.g. classMap.put("data", Person.class) - * @return List - */ - public static List getListFromJsonArrStr(String jsonArrStr, Class clazz, Map classMap) { - JSONArray jsonArr = JSONArray.fromObject(jsonArrStr); - List list = new ArrayList(); - for (int i = 0; i < jsonArr.size(); i++) { - list.add(JSONObject.toBean(jsonArr.getJSONObject(i), clazz, classMap)); - } - return list; - } - - /** - * 把json对象串转换成map对象 - * @param jsonObjStr e.g. {'name':'get','int':1,'double',1.1,'null':null} - * @return Map - */ - public static Map getMapFromJsonObjStr(String jsonObjStr) { - JSONObject jsonObject = JSONObject.fromObject(jsonObjStr); - - Map map = new HashMap(); - for (Iterator iter = jsonObject.keys(); iter.hasNext();) { - String key = (String) iter.next(); - map.put(key, jsonObject.get(key)); - } - return map; - } - - /** - * 把json对象串转换成map对象,且map对象里存放的为其他实体Bean - * @param jsonObjStr e.g. {'data1':{'name':'get'},'data2':{'name':'set'}} - * @param clazz e.g. Person.class - * @return Map - */ - public static Map getMapFromJsonObjStr(String jsonObjStr, Class clazz) { - JSONObject jsonObject = JSONObject.fromObject(jsonObjStr); - - Map map = new HashMap(); - for (Iterator iter = jsonObject.keys(); iter.hasNext();) { - String key = (String) iter.next(); - map.put(key, JSONObject.toBean(jsonObject.getJSONObject(key), clazz)); - } - return map; - } - - /** - * 把json对象串转换成map对象,且map对象里存放的其他实体Bean还含有另外实体Bean - * @param jsonObjStr e.g. {'mybean':{'data':[{'name':'get'}]}} - * @param clazz e.g. MyBean.class - * @param classMap e.g. classMap.put("data", Person.class) - * @return Map - */ - public static Map getMapFromJsonObjStr(String jsonObjStr, Class clazz, Map classMap) { - JSONObject jsonObject = JSONObject.fromObject(jsonObjStr); - - Map map = new HashMap(); - for (Iterator iter = jsonObject.keys(); iter.hasNext();) { - String key = (String) iter.next(); - map.put(key, JSONObject - .toBean(jsonObject.getJSONObject(key), clazz, classMap)); - } - return map; - } - - - -} \ No newline at end of file diff --git a/src/main/java/com/zhangshuaike/utils/MyX509TrustManager.java b/src/main/java/com/zhangshuaike/utils/MyX509TrustManager.java deleted file mode 100644 index 9c5057a..0000000 --- a/src/main/java/com/zhangshuaike/utils/MyX509TrustManager.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.zhangshuaike.utils; - -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -import javax.net.ssl.X509TrustManager; - -public class MyX509TrustManager implements X509TrustManager { - - { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException - { - } - - public X509Certificate[] getAcceptedIssuers() - { - return null; - } - - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - - } - -} diff --git a/src/main/resources/config.properties b/src/main/resources/config.properties deleted file mode 100644 index b3d1e7e..0000000 --- a/src/main/resources/config.properties +++ /dev/null @@ -1,7 +0,0 @@ -client_ID = -client_SERCRET = -redirect_URI = -baseURL=https://api.weibo.com/2/ -accessTokenURL=https://api.weibo.com/oauth2/access_token -authorizeURL=https://api.weibo.com/oauth2/authorize -rmURL=https://rm.api.weibo.com/2/ \ No newline at end of file diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties index 27f6653..327f690 100644 --- a/src/main/resources/log4j.properties +++ b/src/main/resources/log4j.properties @@ -1,20 +1,20 @@ - log4j.rootLogger=debug, stdout, R - log4j.appender.stdout=org.apache.log4j.ConsoleAppender - log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.rootLogger=debug, stdout, R +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - log4j.logger.org.apache.commons.httpclient=info - log4j.logger.httpclient.wire.content=info - log4j.logger.httpclient.wire.header=info +log4j.logger.org.apache.commons.httpclient=info +log4j.logger.httpclient.wire.content=info +log4j.logger.httpclient.wire.header=info - # Pattern to output the caller's file name and line number. - log4j.appender.stdout.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n - log4j.appender.R=org.apache.log4j.RollingFileAppender - log4j.appender.R.File=weibo.log - log4j.appender.R.MaxFileSize= 100KB +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=weibo.log +log4j.appender.R.MaxFileSize= 100KB - # Keep one backup file - log4j.appender.R.MaxBackupIndex=1 +# Keep one backup file +log4j.appender.R.MaxBackupIndex=1 - log4j.appender.R.layout=org.apache.log4j.PatternLayout - log4j.appender.R.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n \ No newline at end of file +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n \ No newline at end of file diff --git a/src/main/webapp/auth.jsp b/src/main/webapp/auth.jsp index 0104687..1988222 100644 --- a/src/main/webapp/auth.jsp +++ b/src/main/webapp/auth.jsp @@ -4,7 +4,7 @@ -Insert title here +login result diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 8ab512d..aff5449 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -4,7 +4,7 @@ -Insert title here +to login 点我进行微博登陆 diff --git a/target/classes/com/zhangshuaike/action/DoLoginServlet.class b/target/classes/com/zhangshuaike/action/DoLoginServlet.class deleted file mode 100644 index 87f4adc..0000000 Binary files a/target/classes/com/zhangshuaike/action/DoLoginServlet.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/action/QueryWeiBo.class b/target/classes/com/zhangshuaike/action/QueryWeiBo.class deleted file mode 100644 index 11f6dce..0000000 Binary files a/target/classes/com/zhangshuaike/action/QueryWeiBo.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/HttpsUtil$1.class b/target/classes/com/zhangshuaike/utils/HttpsUtil$1.class deleted file mode 100644 index 8f78ce2..0000000 Binary files a/target/classes/com/zhangshuaike/utils/HttpsUtil$1.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/HttpsUtil$DefaultTrustManager.class b/target/classes/com/zhangshuaike/utils/HttpsUtil$DefaultTrustManager.class deleted file mode 100644 index a3db462..0000000 Binary files a/target/classes/com/zhangshuaike/utils/HttpsUtil$DefaultTrustManager.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/HttpsUtil$TrustAnyHostnameVerifier.class b/target/classes/com/zhangshuaike/utils/HttpsUtil$TrustAnyHostnameVerifier.class deleted file mode 100644 index 8c2d34b..0000000 Binary files a/target/classes/com/zhangshuaike/utils/HttpsUtil$TrustAnyHostnameVerifier.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/HttpsUtil.class b/target/classes/com/zhangshuaike/utils/HttpsUtil.class deleted file mode 100644 index c80a1c3..0000000 Binary files a/target/classes/com/zhangshuaike/utils/HttpsUtil.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/JsonUtil.class b/target/classes/com/zhangshuaike/utils/JsonUtil.class deleted file mode 100644 index e621ead..0000000 Binary files a/target/classes/com/zhangshuaike/utils/JsonUtil.class and /dev/null differ diff --git a/target/classes/com/zhangshuaike/utils/MyX509TrustManager.class b/target/classes/com/zhangshuaike/utils/MyX509TrustManager.class deleted file mode 100644 index 8a1e8ce..0000000 Binary files a/target/classes/com/zhangshuaike/utils/MyX509TrustManager.class and /dev/null differ diff --git a/target/classes/config.properties b/target/classes/config.properties deleted file mode 100644 index b3d1e7e..0000000 --- a/target/classes/config.properties +++ /dev/null @@ -1,7 +0,0 @@ -client_ID = -client_SERCRET = -redirect_URI = -baseURL=https://api.weibo.com/2/ -accessTokenURL=https://api.weibo.com/oauth2/access_token -authorizeURL=https://api.weibo.com/oauth2/authorize -rmURL=https://rm.api.weibo.com/2/ \ No newline at end of file diff --git a/target/classes/log4j.properties b/target/classes/log4j.properties deleted file mode 100644 index 27f6653..0000000 --- a/target/classes/log4j.properties +++ /dev/null @@ -1,20 +0,0 @@ - log4j.rootLogger=debug, stdout, R - log4j.appender.stdout=org.apache.log4j.ConsoleAppender - log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - - log4j.logger.org.apache.commons.httpclient=info - log4j.logger.httpclient.wire.content=info - log4j.logger.httpclient.wire.header=info - - # Pattern to output the caller's file name and line number. - log4j.appender.stdout.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n - - log4j.appender.R=org.apache.log4j.RollingFileAppender - log4j.appender.R.File=weibo.log - log4j.appender.R.MaxFileSize= 100KB - - # Keep one backup file - log4j.appender.R.MaxBackupIndex=1 - - log4j.appender.R.layout=org.apache.log4j.PatternLayout - log4j.appender.R.layout.ConversionPattern=%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n \ No newline at end of file diff --git a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF deleted file mode 100644 index 0aed59d..0000000 --- a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Built-By: shuaike -Build-Jdk: 1.8.0_121 -Created-By: Maven Integration for Eclipse - diff --git a/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.properties b/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.properties deleted file mode 100644 index 6419be7..0000000 --- a/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.properties +++ /dev/null @@ -1,7 +0,0 @@ -#Generated by Maven Integration for Eclipse -#Wed Apr 17 21:16:11 CST 2019 -version=0.0.1-SNAPSHOT -groupId=cn.kgc.tangcco.tcmp073.zhangshuaike -m2e.projectName=Tesweibo -m2e.projectLocation=D\:\\STS\\workspaces\\Tesweibo -artifactId=Tesweibo diff --git a/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.xml b/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.xml deleted file mode 100644 index bedca3f..0000000 --- a/target/m2e-wtp/web-resources/META-INF/maven/cn.kgc.tangcco.tcmp073.zhangshuaike/Tesweibo/pom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - 4.0.0 - cn.kgc.tangcco.tcmp073.zhangshuaike - Tesweibo - 0.0.1-SNAPSHOT - war - - - - - - javax - javaee-api - 7.0 - provided - - - - org.apache.commons - commons-lang3 - 3.1 - - - - net.sf.json-lib - json-lib - 2.3 - jdk15 - - - - - - - com.alibaba - fastjson - 1.2.44 - - - - - - - jstl - jstl - 1.2 - - - junit - junit - 4.12 - test - - - mysql - mysql-connector-java - 5.1.44 - - - com.mchange - c3p0 - 0.9.5.2 - - - - - - com.belerweb - weibo4j-oauth2 - 2.1.1-beta2-3 - - - - - - log4j - log4j - 1.2.9 - - - - - - - ${project.artifactId} - - - org.eclipse.jetty - jetty-maven-plugin - 9.4.10.RC0 - - - 8080 - - 10 - manual - - / - - - - - package - - run-war - - - - - - - \ No newline at end of file diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index 03d318f..0000000 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,8 +0,0 @@ -com\zhangshuaike\action\DoLoginServlet.class -com\zhangshuaike\utils\MyX509TrustManager.class -com\zhangshuaike\utils\HttpsUtil$1.class -com\zhangshuaike\utils\HttpsUtil.class -com\zhangshuaike\utils\JsonUtil.class -com\zhangshuaike\action\QueryWeiBo.class -com\zhangshuaike\utils\HttpsUtil$DefaultTrustManager.class -com\zhangshuaike\utils\HttpsUtil$TrustAnyHostnameVerifier.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index 573161f..0000000 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,5 +0,0 @@ -D:\STS\workspaces\Tesweibo\src\main\java\com\zhangshuaike\action\DoLoginServlet.java -D:\STS\workspaces\Tesweibo\src\main\java\com\zhangshuaike\utils\MyX509TrustManager.java -D:\STS\workspaces\Tesweibo\src\main\java\com\zhangshuaike\action\QueryWeiBo.java -D:\STS\workspaces\Tesweibo\src\main\java\com\zhangshuaike\utils\HttpsUtil.java -D:\STS\workspaces\Tesweibo\src\main\java\com\zhangshuaike\utils\JsonUtil.java diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst deleted file mode 100644 index 8d03cb7..0000000 --- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ /dev/null @@ -1 +0,0 @@ -cn\keshaowl\test\Test.class diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst deleted file mode 100644 index 3f74697..0000000 --- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ /dev/null @@ -1 +0,0 @@ -D:\STS\workspaces\Tesweibo\src\test\java\cn\keshaowl\test\Test.java diff --git a/target/test-classes/1 b/target/test-classes/1 deleted file mode 100644 index 9c2a3a8..0000000 --- a/target/test-classes/1 +++ /dev/null @@ -1 +0,0 @@ -我就是个占地方的 \ No newline at end of file diff --git a/target/test-classes/cn/keshaowl/test/Test.class b/target/test-classes/cn/keshaowl/test/Test.class deleted file mode 100644 index 9d0b00e..0000000 Binary files a/target/test-classes/cn/keshaowl/test/Test.class and /dev/null differ diff --git a/weibo.log b/weibo.log deleted file mode 100644 index 0017685..0000000 --- a/weibo.log +++ /dev/null @@ -1,640 +0,0 @@ -0 DEBUG [2019-02-25 21:41:11] Request: -1 DEBUG [2019-02-25 21:41:11] POSThttps://api.weibo.com/oauth2/access_token -498 DEBUG [2019-02-25 21:41:12] Response: -498 DEBUG [2019-02-25 21:41:12] https StatusCode:200 -498 DEBUG [2019-02-25 21:41:12] Server:nginx/1.6.1 -499 DEBUG [2019-02-25 21:41:12] Date:Mon, 25 Feb 2019 13:41:13 GMT -499 DEBUG [2019-02-25 21:41:12] Content-Type:application/json;charset=UTF-8 -499 DEBUG [2019-02-25 21:41:12] Content-Length:137 -499 DEBUG [2019-02-25 21:41:12] Connection:keep-alive -499 DEBUG [2019-02-25 21:41:12] Pragma:No-cache -499 DEBUG [2019-02-25 21:41:12] Cache-Control:no-cache -499 DEBUG [2019-02-25 21:41:12] Expires:Thu, 01 Jan 1970 00:00:00 GMT -502 DEBUG [2019-02-25 21:41:12] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -511 DEBUG [2019-02-25 21:41:12] Request: -511 DEBUG [2019-02-25 21:41:12] GET:https://api.weibo.com/2/users/show.json -515 DEBUG [2019-02-25 21:41:12] Authorization: OAuth2 5658942780 -515 DEBUG [2019-02-25 21:41:12] API-RemoteIP: 192.168.1.106 -529 DEBUG [2019-02-25 21:41:12] Response: -530 DEBUG [2019-02-25 21:41:12] https StatusCode:400 -530 DEBUG [2019-02-25 21:41:12] Server:nginx/1.6.1 -530 DEBUG [2019-02-25 21:41:12] Date:Mon, 25 Feb 2019 13:41:13 GMT -530 DEBUG [2019-02-25 21:41:12] Content-Type:application/json;charset=UTF-8 -530 DEBUG [2019-02-25 21:41:12] Transfer-Encoding:chunked -530 DEBUG [2019-02-25 21:41:12] Connection:keep-alive -530 DEBUG [2019-02-25 21:41:12] Vary:Accept-Encoding -530 WARN [2019-02-25 21:41:12] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -531 DEBUG [2019-02-25 21:41:12] {"error":"source paramter(appkey) is missing","error_code":10006,"request":"/2/users/show.json"} - -36763 DEBUG [2019-02-25 21:41:48] Request: -36766 DEBUG [2019-02-25 21:41:48] POSThttps://api.weibo.com/oauth2/access_token -36819 DEBUG [2019-02-25 21:41:48] Response: -36819 DEBUG [2019-02-25 21:41:48] https StatusCode:400 -36819 DEBUG [2019-02-25 21:41:48] Server:nginx/1.6.1 -36819 DEBUG [2019-02-25 21:41:48] Date:Mon, 25 Feb 2019 13:41:49 GMT -36819 DEBUG [2019-02-25 21:41:48] Transfer-Encoding:chunked -36819 DEBUG [2019-02-25 21:41:48] Connection:keep-alive -36819 DEBUG [2019-02-25 21:41:48] Pragma:No-cache -36819 DEBUG [2019-02-25 21:41:48] Cache-Control:no-cache -36819 DEBUG [2019-02-25 21:41:48] Expires:Thu, 01 Jan 1970 00:00:00 GMT -36819 WARN [2019-02-25 21:41:48] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -36820 DEBUG [2019-02-25 21:41:48] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -37216 DEBUG [2019-02-25 21:41:48] Request: -37216 DEBUG [2019-02-25 21:41:48] POSThttps://api.weibo.com/oauth2/access_token -37234 DEBUG [2019-02-25 21:41:48] Response: -37234 DEBUG [2019-02-25 21:41:48] https StatusCode:400 -37235 DEBUG [2019-02-25 21:41:48] Server:nginx/1.6.1 -37235 DEBUG [2019-02-25 21:41:48] Date:Mon, 25 Feb 2019 13:41:50 GMT -37235 DEBUG [2019-02-25 21:41:48] Transfer-Encoding:chunked -37235 DEBUG [2019-02-25 21:41:48] Connection:keep-alive -37235 DEBUG [2019-02-25 21:41:48] Pragma:No-cache -37235 DEBUG [2019-02-25 21:41:48] Cache-Control:no-cache -37235 DEBUG [2019-02-25 21:41:48] Expires:Thu, 01 Jan 1970 00:00:00 GMT -37235 WARN [2019-02-25 21:41:48] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -37235 DEBUG [2019-02-25 21:41:48] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -37522 DEBUG [2019-02-25 21:41:49] Request: -37522 DEBUG [2019-02-25 21:41:49] POSThttps://api.weibo.com/oauth2/access_token -37541 DEBUG [2019-02-25 21:41:49] Response: -37542 DEBUG [2019-02-25 21:41:49] https StatusCode:400 -37542 DEBUG [2019-02-25 21:41:49] Server:nginx/1.6.1 -37542 DEBUG [2019-02-25 21:41:49] Date:Mon, 25 Feb 2019 13:41:50 GMT -37542 DEBUG [2019-02-25 21:41:49] Transfer-Encoding:chunked -37542 DEBUG [2019-02-25 21:41:49] Connection:keep-alive -37542 DEBUG [2019-02-25 21:41:49] Pragma:No-cache -37542 DEBUG [2019-02-25 21:41:49] Cache-Control:no-cache -37542 DEBUG [2019-02-25 21:41:49] Expires:Thu, 01 Jan 1970 00:00:00 GMT -37542 WARN [2019-02-25 21:41:49] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -37542 DEBUG [2019-02-25 21:41:49] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -37787 DEBUG [2019-02-25 21:41:49] Request: -37787 DEBUG [2019-02-25 21:41:49] POSThttps://api.weibo.com/oauth2/access_token -37812 DEBUG [2019-02-25 21:41:49] Response: -37812 DEBUG [2019-02-25 21:41:49] https StatusCode:400 -37812 DEBUG [2019-02-25 21:41:49] Server:nginx/1.6.1 -37812 DEBUG [2019-02-25 21:41:49] Date:Mon, 25 Feb 2019 13:41:50 GMT -37812 DEBUG [2019-02-25 21:41:49] Transfer-Encoding:chunked -37812 DEBUG [2019-02-25 21:41:49] Connection:keep-alive -37812 DEBUG [2019-02-25 21:41:49] Pragma:No-cache -37812 DEBUG [2019-02-25 21:41:49] Cache-Control:no-cache -37812 DEBUG [2019-02-25 21:41:49] Expires:Thu, 01 Jan 1970 00:00:00 GMT -37812 WARN [2019-02-25 21:41:49] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -37813 DEBUG [2019-02-25 21:41:49] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -37955 DEBUG [2019-02-25 21:41:49] Request: -37955 DEBUG [2019-02-25 21:41:49] POSThttps://api.weibo.com/oauth2/access_token -37971 DEBUG [2019-02-25 21:41:49] Response: -37971 DEBUG [2019-02-25 21:41:49] https StatusCode:400 -37971 DEBUG [2019-02-25 21:41:49] Server:nginx/1.6.1 -37972 DEBUG [2019-02-25 21:41:49] Date:Mon, 25 Feb 2019 13:41:50 GMT -37972 DEBUG [2019-02-25 21:41:49] Transfer-Encoding:chunked -37972 DEBUG [2019-02-25 21:41:49] Connection:keep-alive -37972 DEBUG [2019-02-25 21:41:49] Pragma:No-cache -37972 DEBUG [2019-02-25 21:41:49] Cache-Control:no-cache -37972 DEBUG [2019-02-25 21:41:49] Expires:Thu, 01 Jan 1970 00:00:00 GMT -37972 WARN [2019-02-25 21:41:49] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -37972 DEBUG [2019-02-25 21:41:49] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -42361 DEBUG [2019-02-25 21:41:54] Request: -42361 DEBUG [2019-02-25 21:41:54] POSThttps://api.weibo.com/oauth2/access_token -42380 DEBUG [2019-02-25 21:41:54] Response: -42381 DEBUG [2019-02-25 21:41:54] https StatusCode:400 -42381 DEBUG [2019-02-25 21:41:54] Server:nginx/1.6.1 -42381 DEBUG [2019-02-25 21:41:54] Date:Mon, 25 Feb 2019 13:41:55 GMT -42381 DEBUG [2019-02-25 21:41:54] Transfer-Encoding:chunked -42381 DEBUG [2019-02-25 21:41:54] Connection:keep-alive -42381 DEBUG [2019-02-25 21:41:54] Pragma:No-cache -42381 DEBUG [2019-02-25 21:41:54] Cache-Control:no-cache -42381 DEBUG [2019-02-25 21:41:54] Expires:Thu, 01 Jan 1970 00:00:00 GMT -42381 WARN [2019-02-25 21:41:54] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -42381 DEBUG [2019-02-25 21:41:54] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -0 DEBUG [2019-02-25 21:42:34] Request: -0 DEBUG [2019-02-25 21:42:34] POSThttps://api.weibo.com/oauth2/access_token -77 DEBUG [2019-02-25 21:42:34] Response: -77 DEBUG [2019-02-25 21:42:34] https StatusCode:400 -77 DEBUG [2019-02-25 21:42:34] Server:nginx/1.6.1 -77 DEBUG [2019-02-25 21:42:34] Date:Mon, 25 Feb 2019 13:42:35 GMT -77 DEBUG [2019-02-25 21:42:34] Transfer-Encoding:chunked -77 DEBUG [2019-02-25 21:42:34] Connection:keep-alive -77 DEBUG [2019-02-25 21:42:34] Pragma:No-cache -77 DEBUG [2019-02-25 21:42:34] Cache-Control:no-cache -77 DEBUG [2019-02-25 21:42:34] Expires:Thu, 01 Jan 1970 00:00:00 GMT -79 WARN [2019-02-25 21:42:34] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -80 DEBUG [2019-02-25 21:42:34] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -0 DEBUG [2019-02-25 21:43:51] Request: -0 DEBUG [2019-02-25 21:43:51] POSThttps://api.weibo.com/oauth2/access_token -138 DEBUG [2019-02-25 21:43:51] Response: -138 DEBUG [2019-02-25 21:43:51] https StatusCode:400 -138 DEBUG [2019-02-25 21:43:51] Server:nginx/1.6.1 -138 DEBUG [2019-02-25 21:43:51] Date:Mon, 25 Feb 2019 13:43:52 GMT -138 DEBUG [2019-02-25 21:43:51] Transfer-Encoding:chunked -138 DEBUG [2019-02-25 21:43:51] Connection:keep-alive -138 DEBUG [2019-02-25 21:43:51] Pragma:No-cache -138 DEBUG [2019-02-25 21:43:51] Cache-Control:no-cache -138 DEBUG [2019-02-25 21:43:51] Expires:Thu, 01 Jan 1970 00:00:00 GMT -140 WARN [2019-02-25 21:43:51] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -141 DEBUG [2019-02-25 21:43:51] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -985 DEBUG [2019-02-25 21:43:52] Request: -985 DEBUG [2019-02-25 21:43:52] POSThttps://api.weibo.com/oauth2/access_token -1015 DEBUG [2019-02-25 21:43:52] Response: -1015 DEBUG [2019-02-25 21:43:52] https StatusCode:400 -1016 DEBUG [2019-02-25 21:43:52] Server:nginx/1.6.1 -1016 DEBUG [2019-02-25 21:43:52] Date:Mon, 25 Feb 2019 13:43:53 GMT -1016 DEBUG [2019-02-25 21:43:52] Transfer-Encoding:chunked -1016 DEBUG [2019-02-25 21:43:52] Connection:keep-alive -1016 DEBUG [2019-02-25 21:43:52] Pragma:No-cache -1016 DEBUG [2019-02-25 21:43:52] Cache-Control:no-cache -1016 DEBUG [2019-02-25 21:43:52] Expires:Thu, 01 Jan 1970 00:00:00 GMT -1016 WARN [2019-02-25 21:43:52] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -1016 DEBUG [2019-02-25 21:43:52] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -1393 DEBUG [2019-02-25 21:43:52] Request: -1393 DEBUG [2019-02-25 21:43:52] POSThttps://api.weibo.com/oauth2/access_token -1413 DEBUG [2019-02-25 21:43:52] Response: -1413 DEBUG [2019-02-25 21:43:52] https StatusCode:400 -1413 DEBUG [2019-02-25 21:43:52] Server:nginx/1.6.1 -1413 DEBUG [2019-02-25 21:43:52] Date:Mon, 25 Feb 2019 13:43:54 GMT -1413 DEBUG [2019-02-25 21:43:52] Transfer-Encoding:chunked -1413 DEBUG [2019-02-25 21:43:52] Connection:keep-alive -1413 DEBUG [2019-02-25 21:43:52] Pragma:No-cache -1413 DEBUG [2019-02-25 21:43:52] Cache-Control:no-cache -1413 DEBUG [2019-02-25 21:43:52] Expires:Thu, 01 Jan 1970 00:00:00 GMT -1413 WARN [2019-02-25 21:43:52] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -1413 DEBUG [2019-02-25 21:43:52] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -1944 DEBUG [2019-02-25 21:43:53] Request: -1944 DEBUG [2019-02-25 21:43:53] POSThttps://api.weibo.com/oauth2/access_token -1965 DEBUG [2019-02-25 21:43:53] Response: -1965 DEBUG [2019-02-25 21:43:53] https StatusCode:400 -1966 DEBUG [2019-02-25 21:43:53] Server:nginx/1.6.1 -1966 DEBUG [2019-02-25 21:43:53] Date:Mon, 25 Feb 2019 13:43:54 GMT -1966 DEBUG [2019-02-25 21:43:53] Transfer-Encoding:chunked -1966 DEBUG [2019-02-25 21:43:53] Connection:keep-alive -1966 DEBUG [2019-02-25 21:43:53] Pragma:No-cache -1966 DEBUG [2019-02-25 21:43:53] Cache-Control:no-cache -1966 DEBUG [2019-02-25 21:43:53] Expires:Thu, 01 Jan 1970 00:00:00 GMT -1966 WARN [2019-02-25 21:43:53] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -1966 DEBUG [2019-02-25 21:43:53] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -2137 DEBUG [2019-02-25 21:43:53] Request: -2137 DEBUG [2019-02-25 21:43:53] POSThttps://api.weibo.com/oauth2/access_token -2156 DEBUG [2019-02-25 21:43:53] Response: -2156 DEBUG [2019-02-25 21:43:53] https StatusCode:400 -2156 DEBUG [2019-02-25 21:43:53] Server:nginx/1.6.1 -2156 DEBUG [2019-02-25 21:43:53] Date:Mon, 25 Feb 2019 13:43:54 GMT -2156 DEBUG [2019-02-25 21:43:53] Transfer-Encoding:chunked -2156 DEBUG [2019-02-25 21:43:53] Connection:keep-alive -2156 DEBUG [2019-02-25 21:43:53] Pragma:No-cache -2157 DEBUG [2019-02-25 21:43:53] Cache-Control:no-cache -2157 DEBUG [2019-02-25 21:43:53] Expires:Thu, 01 Jan 1970 00:00:00 GMT -2157 WARN [2019-02-25 21:43:53] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -2157 DEBUG [2019-02-25 21:43:53] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -2352 DEBUG [2019-02-25 21:43:53] Request: -2352 DEBUG [2019-02-25 21:43:53] POSThttps://api.weibo.com/oauth2/access_token -2369 DEBUG [2019-02-25 21:43:53] Response: -2370 DEBUG [2019-02-25 21:43:53] https StatusCode:400 -2370 DEBUG [2019-02-25 21:43:53] Server:nginx/1.6.1 -2370 DEBUG [2019-02-25 21:43:53] Date:Mon, 25 Feb 2019 13:43:55 GMT -2370 DEBUG [2019-02-25 21:43:53] Transfer-Encoding:chunked -2370 DEBUG [2019-02-25 21:43:53] Connection:keep-alive -2370 DEBUG [2019-02-25 21:43:53] Pragma:No-cache -2370 DEBUG [2019-02-25 21:43:53] Cache-Control:no-cache -2370 DEBUG [2019-02-25 21:43:53] Expires:Thu, 01 Jan 1970 00:00:00 GMT -2370 WARN [2019-02-25 21:43:53] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -2370 DEBUG [2019-02-25 21:43:53] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -2544 DEBUG [2019-02-25 21:43:54] Request: -2544 DEBUG [2019-02-25 21:43:54] POSThttps://api.weibo.com/oauth2/access_token -2573 DEBUG [2019-02-25 21:43:54] Response: -2573 DEBUG [2019-02-25 21:43:54] https StatusCode:400 -2573 DEBUG [2019-02-25 21:43:54] Server:nginx/1.6.1 -2573 DEBUG [2019-02-25 21:43:54] Date:Mon, 25 Feb 2019 13:43:55 GMT -2573 DEBUG [2019-02-25 21:43:54] Transfer-Encoding:chunked -2573 DEBUG [2019-02-25 21:43:54] Connection:keep-alive -2573 DEBUG [2019-02-25 21:43:54] Pragma:No-cache -2573 DEBUG [2019-02-25 21:43:54] Cache-Control:no-cache -2573 DEBUG [2019-02-25 21:43:54] Expires:Thu, 01 Jan 1970 00:00:00 GMT -2574 WARN [2019-02-25 21:43:54] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -2574 DEBUG [2019-02-25 21:43:54] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -2727 DEBUG [2019-02-25 21:43:54] Request: -2727 DEBUG [2019-02-25 21:43:54] POSThttps://api.weibo.com/oauth2/access_token -2744 DEBUG [2019-02-25 21:43:54] Response: -2744 DEBUG [2019-02-25 21:43:54] https StatusCode:400 -2744 DEBUG [2019-02-25 21:43:54] Server:nginx/1.6.1 -2744 DEBUG [2019-02-25 21:43:54] Date:Mon, 25 Feb 2019 13:43:55 GMT -2744 DEBUG [2019-02-25 21:43:54] Transfer-Encoding:chunked -2744 DEBUG [2019-02-25 21:43:54] Connection:keep-alive -2744 DEBUG [2019-02-25 21:43:54] Pragma:No-cache -2744 DEBUG [2019-02-25 21:43:54] Cache-Control:no-cache -2744 DEBUG [2019-02-25 21:43:54] Expires:Thu, 01 Jan 1970 00:00:00 GMT -2744 WARN [2019-02-25 21:43:54] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -2744 DEBUG [2019-02-25 21:43:54] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -2911 DEBUG [2019-02-25 21:43:54] Request: -2911 DEBUG [2019-02-25 21:43:54] POSThttps://api.weibo.com/oauth2/access_token -2928 DEBUG [2019-02-25 21:43:54] Response: -2929 DEBUG [2019-02-25 21:43:54] https StatusCode:400 -2929 DEBUG [2019-02-25 21:43:54] Server:nginx/1.6.1 -2929 DEBUG [2019-02-25 21:43:54] Date:Mon, 25 Feb 2019 13:43:55 GMT -2929 DEBUG [2019-02-25 21:43:54] Transfer-Encoding:chunked -2929 DEBUG [2019-02-25 21:43:54] Connection:keep-alive -2929 DEBUG [2019-02-25 21:43:54] Pragma:No-cache -2929 DEBUG [2019-02-25 21:43:54] Cache-Control:no-cache -2929 DEBUG [2019-02-25 21:43:54] Expires:Thu, 01 Jan 1970 00:00:00 GMT -2929 WARN [2019-02-25 21:43:54] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -2929 DEBUG [2019-02-25 21:43:54] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -4119 DEBUG [2019-02-25 21:43:55] Request: -4120 DEBUG [2019-02-25 21:43:55] POSThttps://api.weibo.com/oauth2/access_token -4138 DEBUG [2019-02-25 21:43:55] Response: -4138 DEBUG [2019-02-25 21:43:55] https StatusCode:400 -4138 DEBUG [2019-02-25 21:43:55] Server:nginx/1.6.1 -4138 DEBUG [2019-02-25 21:43:55] Date:Mon, 25 Feb 2019 13:43:56 GMT -4138 DEBUG [2019-02-25 21:43:55] Transfer-Encoding:chunked -4138 DEBUG [2019-02-25 21:43:55] Connection:keep-alive -4138 DEBUG [2019-02-25 21:43:55] Pragma:No-cache -4138 DEBUG [2019-02-25 21:43:55] Cache-Control:no-cache -4138 DEBUG [2019-02-25 21:43:55] Expires:Thu, 01 Jan 1970 00:00:00 GMT -4138 WARN [2019-02-25 21:43:55] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -4138 DEBUG [2019-02-25 21:43:55] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -28439 DEBUG [2019-02-25 21:44:19] Request: -28439 DEBUG [2019-02-25 21:44:19] POSThttps://api.weibo.com/oauth2/access_token -28457 DEBUG [2019-02-25 21:44:19] Response: -28457 DEBUG [2019-02-25 21:44:19] https StatusCode:400 -28457 DEBUG [2019-02-25 21:44:19] Server:nginx/1.6.1 -28457 DEBUG [2019-02-25 21:44:19] Date:Mon, 25 Feb 2019 13:44:21 GMT -28457 DEBUG [2019-02-25 21:44:19] Transfer-Encoding:chunked -28457 DEBUG [2019-02-25 21:44:19] Connection:keep-alive -28457 DEBUG [2019-02-25 21:44:19] Pragma:No-cache -28457 DEBUG [2019-02-25 21:44:19] Cache-Control:no-cache -28457 DEBUG [2019-02-25 21:44:19] Expires:Thu, 01 Jan 1970 00:00:00 GMT -28457 WARN [2019-02-25 21:44:19] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -28458 DEBUG [2019-02-25 21:44:19] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -29048 DEBUG [2019-02-25 21:44:20] Request: -29048 DEBUG [2019-02-25 21:44:20] POSThttps://api.weibo.com/oauth2/access_token -29076 DEBUG [2019-02-25 21:44:20] Response: -29076 DEBUG [2019-02-25 21:44:20] https StatusCode:400 -29076 DEBUG [2019-02-25 21:44:20] Server:nginx/1.6.1 -29076 DEBUG [2019-02-25 21:44:20] Date:Mon, 25 Feb 2019 13:44:21 GMT -29076 DEBUG [2019-02-25 21:44:20] Transfer-Encoding:chunked -29076 DEBUG [2019-02-25 21:44:20] Connection:keep-alive -29076 DEBUG [2019-02-25 21:44:20] Pragma:No-cache -29076 DEBUG [2019-02-25 21:44:20] Cache-Control:no-cache -29077 DEBUG [2019-02-25 21:44:20] Expires:Thu, 01 Jan 1970 00:00:00 GMT -29077 WARN [2019-02-25 21:44:20] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -29077 DEBUG [2019-02-25 21:44:20] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -45465 DEBUG [2019-02-25 21:44:36] Request: -45465 DEBUG [2019-02-25 21:44:36] POSThttps://api.weibo.com/oauth2/access_token -45487 DEBUG [2019-02-25 21:44:37] Response: -45487 DEBUG [2019-02-25 21:44:37] https StatusCode:400 -45487 DEBUG [2019-02-25 21:44:37] Server:nginx/1.6.1 -45487 DEBUG [2019-02-25 21:44:37] Date:Mon, 25 Feb 2019 13:44:38 GMT -45487 DEBUG [2019-02-25 21:44:37] Transfer-Encoding:chunked -45487 DEBUG [2019-02-25 21:44:37] Connection:keep-alive -45487 DEBUG [2019-02-25 21:44:37] Pragma:No-cache -45487 DEBUG [2019-02-25 21:44:37] Cache-Control:no-cache -45487 DEBUG [2019-02-25 21:44:37] Expires:Thu, 01 Jan 1970 00:00:00 GMT -45487 WARN [2019-02-25 21:44:37] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -45487 DEBUG [2019-02-25 21:44:37] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -0 DEBUG [2019-02-25 21:46:09] Request: -0 DEBUG [2019-02-25 21:46:09] POSThttps://api.weibo.com/oauth2/access_token -83 DEBUG [2019-02-25 21:46:10] Response: -84 DEBUG [2019-02-25 21:46:10] https StatusCode:400 -84 DEBUG [2019-02-25 21:46:10] Server:nginx/1.6.1 -84 DEBUG [2019-02-25 21:46:10] Date:Mon, 25 Feb 2019 13:46:11 GMT -84 DEBUG [2019-02-25 21:46:10] Transfer-Encoding:chunked -84 DEBUG [2019-02-25 21:46:10] Connection:keep-alive -84 DEBUG [2019-02-25 21:46:10] Pragma:No-cache -84 DEBUG [2019-02-25 21:46:10] Cache-Control:no-cache -84 DEBUG [2019-02-25 21:46:10] Expires:Thu, 01 Jan 1970 00:00:00 GMT -85 WARN [2019-02-25 21:46:10] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -86 DEBUG [2019-02-25 21:46:10] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f40ad106dd1ddf10739f647d04e970ea"} - -34599 DEBUG [2019-02-25 21:46:44] Request: -34600 DEBUG [2019-02-25 21:46:44] POSThttps://api.weibo.com/oauth2/access_token -34713 DEBUG [2019-02-25 21:46:44] Response: -34713 DEBUG [2019-02-25 21:46:44] https StatusCode:200 -34713 DEBUG [2019-02-25 21:46:44] Server:nginx/1.6.1 -34713 DEBUG [2019-02-25 21:46:44] Date:Mon, 25 Feb 2019 13:46:45 GMT -34713 DEBUG [2019-02-25 21:46:44] Content-Type:application/json;charset=UTF-8 -34713 DEBUG [2019-02-25 21:46:44] Content-Length:137 -34713 DEBUG [2019-02-25 21:46:44] Connection:keep-alive -34713 DEBUG [2019-02-25 21:46:44] Pragma:No-cache -34714 DEBUG [2019-02-25 21:46:44] Cache-Control:no-cache -34714 DEBUG [2019-02-25 21:46:44] Expires:Thu, 01 Jan 1970 00:00:00 GMT -34714 DEBUG [2019-02-25 21:46:44] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -34715 DEBUG [2019-02-25 21:46:44] Request: -34715 DEBUG [2019-02-25 21:46:44] GET:https://api.weibo.com/2/users/show.json -34718 DEBUG [2019-02-25 21:46:44] Authorization: OAuth2 5658942780 -34718 DEBUG [2019-02-25 21:46:44] API-RemoteIP: 192.168.1.106 -34733 DEBUG [2019-02-25 21:46:44] Response: -34733 DEBUG [2019-02-25 21:46:44] https StatusCode:400 -34733 DEBUG [2019-02-25 21:46:44] Server:nginx/1.6.1 -34733 DEBUG [2019-02-25 21:46:44] Date:Mon, 25 Feb 2019 13:46:45 GMT -34733 DEBUG [2019-02-25 21:46:44] Content-Type:application/json;charset=UTF-8 -34733 DEBUG [2019-02-25 21:46:44] Transfer-Encoding:chunked -34733 DEBUG [2019-02-25 21:46:44] Connection:keep-alive -34733 DEBUG [2019-02-25 21:46:44] Vary:Accept-Encoding -34733 WARN [2019-02-25 21:46:44] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -34734 DEBUG [2019-02-25 21:46:44] {"error":"source paramter(appkey) is missing","error_code":10006,"request":"/2/users/show.json"} - -0 DEBUG [2019-02-25 21:49:06] Request: -1 DEBUG [2019-02-25 21:49:06] POSThttps://api.weibo.com/oauth2/access_token -88 DEBUG [2019-02-25 21:49:06] Response: -88 DEBUG [2019-02-25 21:49:06] https StatusCode:400 -89 DEBUG [2019-02-25 21:49:06] Server:nginx/1.6.1 -89 DEBUG [2019-02-25 21:49:06] Date:Mon, 25 Feb 2019 13:49:07 GMT -89 DEBUG [2019-02-25 21:49:06] Transfer-Encoding:chunked -89 DEBUG [2019-02-25 21:49:06] Connection:keep-alive -89 DEBUG [2019-02-25 21:49:06] Pragma:No-cache -89 DEBUG [2019-02-25 21:49:06] Cache-Control:no-cache -90 DEBUG [2019-02-25 21:49:06] Expires:Thu, 01 Jan 1970 00:00:00 GMT -93 WARN [2019-02-25 21:49:06] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -94 DEBUG [2019-02-25 21:49:06] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:4527c7a6d677366baa4ec6e61f75d9b1"} - -750 DEBUG [2019-02-25 21:49:06] Request: -751 DEBUG [2019-02-25 21:49:06] POSThttps://api.weibo.com/oauth2/access_token -831 DEBUG [2019-02-25 21:49:06] Response: -831 DEBUG [2019-02-25 21:49:06] https StatusCode:400 -831 DEBUG [2019-02-25 21:49:06] Server:nginx/1.6.1 -831 DEBUG [2019-02-25 21:49:06] Date:Mon, 25 Feb 2019 13:49:08 GMT -831 DEBUG [2019-02-25 21:49:06] Transfer-Encoding:chunked -831 DEBUG [2019-02-25 21:49:06] Connection:keep-alive -831 DEBUG [2019-02-25 21:49:06] Pragma:No-cache -831 DEBUG [2019-02-25 21:49:06] Cache-Control:no-cache -831 DEBUG [2019-02-25 21:49:06] Expires:Thu, 01 Jan 1970 00:00:00 GMT -831 WARN [2019-02-25 21:49:06] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -832 DEBUG [2019-02-25 21:49:06] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:4527c7a6d677366baa4ec6e61f75d9b1"} - -1190 DEBUG [2019-02-25 21:49:07] Request: -1190 DEBUG [2019-02-25 21:49:07] POSThttps://api.weibo.com/oauth2/access_token -1215 DEBUG [2019-02-25 21:49:07] Response: -1215 DEBUG [2019-02-25 21:49:07] https StatusCode:400 -1215 DEBUG [2019-02-25 21:49:07] Server:nginx/1.6.1 -1215 DEBUG [2019-02-25 21:49:07] Date:Mon, 25 Feb 2019 13:49:08 GMT -1215 DEBUG [2019-02-25 21:49:07] Transfer-Encoding:chunked -1215 DEBUG [2019-02-25 21:49:07] Connection:keep-alive -1215 DEBUG [2019-02-25 21:49:07] Pragma:No-cache -1215 DEBUG [2019-02-25 21:49:07] Cache-Control:no-cache -1215 DEBUG [2019-02-25 21:49:07] Expires:Thu, 01 Jan 1970 00:00:00 GMT -1215 WARN [2019-02-25 21:49:07] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -1216 DEBUG [2019-02-25 21:49:07] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:4527c7a6d677366baa4ec6e61f75d9b1"} - -1550 DEBUG [2019-02-25 21:49:07] Request: -1550 DEBUG [2019-02-25 21:49:07] POSThttps://api.weibo.com/oauth2/access_token -1570 DEBUG [2019-02-25 21:49:07] Response: -1571 DEBUG [2019-02-25 21:49:07] https StatusCode:400 -1571 DEBUG [2019-02-25 21:49:07] Server:nginx/1.6.1 -1571 DEBUG [2019-02-25 21:49:07] Date:Mon, 25 Feb 2019 13:49:08 GMT -1571 DEBUG [2019-02-25 21:49:07] Transfer-Encoding:chunked -1571 DEBUG [2019-02-25 21:49:07] Connection:keep-alive -1571 DEBUG [2019-02-25 21:49:07] Pragma:No-cache -1571 DEBUG [2019-02-25 21:49:07] Cache-Control:no-cache -1571 DEBUG [2019-02-25 21:49:07] Expires:Thu, 01 Jan 1970 00:00:00 GMT -1571 WARN [2019-02-25 21:49:07] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -1571 DEBUG [2019-02-25 21:49:07] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:4527c7a6d677366baa4ec6e61f75d9b1"} - -13096 DEBUG [2019-02-25 21:49:19] Request: -13097 DEBUG [2019-02-25 21:49:19] POSThttps://api.weibo.com/oauth2/access_token -55221 DEBUG [2019-02-25 21:50:01] Request: -55221 DEBUG [2019-02-25 21:50:01] POSThttps://api.weibo.com/oauth2/access_token -55345 DEBUG [2019-02-25 21:50:01] Response: -55345 DEBUG [2019-02-25 21:50:01] https StatusCode:200 -55345 DEBUG [2019-02-25 21:50:01] Server:nginx/1.6.1 -55345 DEBUG [2019-02-25 21:50:01] Date:Mon, 25 Feb 2019 13:50:02 GMT -55345 DEBUG [2019-02-25 21:50:01] Content-Type:application/json;charset=UTF-8 -55346 DEBUG [2019-02-25 21:50:01] Content-Length:137 -55346 DEBUG [2019-02-25 21:50:01] Connection:keep-alive -55346 DEBUG [2019-02-25 21:50:01] Pragma:No-cache -55346 DEBUG [2019-02-25 21:50:01] Cache-Control:no-cache -55346 DEBUG [2019-02-25 21:50:01] Expires:Thu, 01 Jan 1970 00:00:00 GMT -55346 DEBUG [2019-02-25 21:50:01] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -55349 DEBUG [2019-02-25 21:50:01] Request: -55349 DEBUG [2019-02-25 21:50:01] GET:https://api.weibo.com/2/users/show.json -55352 DEBUG [2019-02-25 21:50:01] Authorization: OAuth2 5658942780 -55352 DEBUG [2019-02-25 21:50:01] API-RemoteIP: 192.168.1.106 -55364 DEBUG [2019-02-25 21:50:01] Response: -55364 DEBUG [2019-02-25 21:50:01] https StatusCode:400 -55365 DEBUG [2019-02-25 21:50:01] Server:nginx/1.6.1 -55365 DEBUG [2019-02-25 21:50:01] Date:Mon, 25 Feb 2019 13:50:02 GMT -55365 DEBUG [2019-02-25 21:50:01] Content-Type:application/json;charset=UTF-8 -55365 DEBUG [2019-02-25 21:50:01] Transfer-Encoding:chunked -55365 DEBUG [2019-02-25 21:50:01] Connection:keep-alive -55365 DEBUG [2019-02-25 21:50:01] Vary:Accept-Encoding -55365 WARN [2019-02-25 21:50:01] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -55365 DEBUG [2019-02-25 21:50:01] {"error":"source paramter(appkey) is missing","error_code":10006,"request":"/2/users/show.json"} - -0 DEBUG [2019-02-26 10:16:34] Request: -2 DEBUG [2019-02-26 10:16:34] POSThttps://api.weibo.com/oauth2/access_token -417 DEBUG [2019-02-26 10:16:35] Response: -417 DEBUG [2019-02-26 10:16:35] https StatusCode:200 -417 DEBUG [2019-02-26 10:16:35] Server:nginx/1.6.1 -418 DEBUG [2019-02-26 10:16:35] Date:Tue, 26 Feb 2019 02:16:38 GMT -418 DEBUG [2019-02-26 10:16:35] Content-Type:application/json;charset=UTF-8 -418 DEBUG [2019-02-26 10:16:35] Content-Length:137 -418 DEBUG [2019-02-26 10:16:35] Connection:keep-alive -418 DEBUG [2019-02-26 10:16:35] Pragma:No-cache -418 DEBUG [2019-02-26 10:16:35] Cache-Control:no-cache -418 DEBUG [2019-02-26 10:16:35] Expires:Thu, 01 Jan 1970 00:00:00 GMT -421 DEBUG [2019-02-26 10:16:35] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -426 DEBUG [2019-02-26 10:16:35] Request: -426 DEBUG [2019-02-26 10:16:35] GET:https://api.weibo.com/2/users/show.json -428 DEBUG [2019-02-26 10:16:35] Authorization: OAuth2 5658942780 -428 DEBUG [2019-02-26 10:16:35] API-RemoteIP: 192.168.1.106 -453 DEBUG [2019-02-26 10:16:35] Response: -453 DEBUG [2019-02-26 10:16:35] https StatusCode:400 -453 DEBUG [2019-02-26 10:16:35] Server:nginx/1.6.1 -454 DEBUG [2019-02-26 10:16:35] Date:Tue, 26 Feb 2019 02:16:38 GMT -454 DEBUG [2019-02-26 10:16:35] Content-Type:application/json;charset=UTF-8 -454 DEBUG [2019-02-26 10:16:35] Transfer-Encoding:chunked -454 DEBUG [2019-02-26 10:16:35] Connection:keep-alive -454 DEBUG [2019-02-26 10:16:35] Vary:Accept-Encoding -454 WARN [2019-02-26 10:16:35] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -455 DEBUG [2019-02-26 10:16:35] {"error":"source paramter(appkey) is missing","error_code":10006,"request":"/2/users/show.json"} - -0 DEBUG [2019-02-26 10:17:06] Request: -1 DEBUG [2019-02-26 10:17:06] POSThttps://api.weibo.com/oauth2/access_token -88 DEBUG [2019-02-26 10:17:06] Response: -88 DEBUG [2019-02-26 10:17:06] https StatusCode:400 -88 DEBUG [2019-02-26 10:17:06] Server:nginx/1.6.1 -89 DEBUG [2019-02-26 10:17:06] Date:Tue, 26 Feb 2019 02:17:09 GMT -89 DEBUG [2019-02-26 10:17:06] Transfer-Encoding:chunked -89 DEBUG [2019-02-26 10:17:06] Connection:keep-alive -89 DEBUG [2019-02-26 10:17:06] Pragma:No-cache -89 DEBUG [2019-02-26 10:17:06] Cache-Control:no-cache -89 DEBUG [2019-02-26 10:17:06] Expires:Thu, 01 Jan 1970 00:00:00 GMT -91 WARN [2019-02-26 10:17:06] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -92 DEBUG [2019-02-26 10:17:06] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:1454333143d69a66532da6210cf442e6"} - -228129 DEBUG [2019-02-26 10:20:54] Request: -228130 DEBUG [2019-02-26 10:20:54] POSThttps://api.weibo.com/oauth2/access_token -244161 DEBUG [2019-02-26 10:21:10] Request: -244161 DEBUG [2019-02-26 10:21:10] POSThttps://api.weibo.com/oauth2/access_token -294668 DEBUG [2019-02-26 10:22:01] Request: -294668 DEBUG [2019-02-26 10:22:01] POSThttps://api.weibo.com/oauth2/access_token -297953 DEBUG [2019-02-26 10:22:04] Request: -297953 DEBUG [2019-02-26 10:22:04] POSThttps://api.weibo.com/oauth2/access_token -0 DEBUG [2019-02-26 10:30:41] Request: -3 DEBUG [2019-02-26 10:30:41] POSThttps://api.weibo.com/oauth2/access_token -440 DEBUG [2019-02-26 10:30:42] Response: -440 DEBUG [2019-02-26 10:30:42] https StatusCode:200 -440 DEBUG [2019-02-26 10:30:42] Server:nginx/1.6.1 -441 DEBUG [2019-02-26 10:30:42] Date:Tue, 26 Feb 2019 02:30:45 GMT -441 DEBUG [2019-02-26 10:30:42] Content-Type:application/json;charset=UTF-8 -441 DEBUG [2019-02-26 10:30:42] Content-Length:137 -441 DEBUG [2019-02-26 10:30:42] Connection:keep-alive -441 DEBUG [2019-02-26 10:30:42] Pragma:No-cache -441 DEBUG [2019-02-26 10:30:42] Cache-Control:no-cache -441 DEBUG [2019-02-26 10:30:42] Expires:Thu, 01 Jan 1970 00:00:00 GMT -447 DEBUG [2019-02-26 10:30:42] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -455 DEBUG [2019-02-26 10:30:42] Request: -455 DEBUG [2019-02-26 10:30:42] GET:https://api.weibo.com/2/users/show.json -178767 DEBUG [2019-02-26 10:33:40] Request: -178768 DEBUG [2019-02-26 10:33:40] POSThttps://api.weibo.com/oauth2/access_token -178816 DEBUG [2019-02-26 10:33:40] Response: -178816 DEBUG [2019-02-26 10:33:40] https StatusCode:400 -178816 DEBUG [2019-02-26 10:33:40] Server:nginx/1.6.1 -178816 DEBUG [2019-02-26 10:33:40] Date:Tue, 26 Feb 2019 02:33:43 GMT -178816 DEBUG [2019-02-26 10:33:40] Transfer-Encoding:chunked -178816 DEBUG [2019-02-26 10:33:40] Connection:keep-alive -178817 DEBUG [2019-02-26 10:33:40] Pragma:No-cache -178817 DEBUG [2019-02-26 10:33:40] Cache-Control:no-cache -178817 DEBUG [2019-02-26 10:33:40] Expires:Thu, 01 Jan 1970 00:00:00 GMT -178817 WARN [2019-02-26 10:33:40] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -178817 DEBUG [2019-02-26 10:33:40] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f63adf5d20bbfbd06d7896983ea233ad"} - -0 DEBUG [2019-02-26 10:34:15] Request: -0 DEBUG [2019-02-26 10:34:15] POSThttps://api.weibo.com/oauth2/access_token -88 DEBUG [2019-02-26 10:34:15] Response: -88 DEBUG [2019-02-26 10:34:15] https StatusCode:400 -88 DEBUG [2019-02-26 10:34:15] Server:nginx/1.6.1 -88 DEBUG [2019-02-26 10:34:15] Date:Tue, 26 Feb 2019 02:34:19 GMT -88 DEBUG [2019-02-26 10:34:15] Transfer-Encoding:chunked -88 DEBUG [2019-02-26 10:34:15] Connection:keep-alive -89 DEBUG [2019-02-26 10:34:15] Pragma:No-cache -89 DEBUG [2019-02-26 10:34:15] Cache-Control:no-cache -89 DEBUG [2019-02-26 10:34:15] Expires:Thu, 01 Jan 1970 00:00:00 GMT -91 WARN [2019-02-26 10:34:15] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -91 DEBUG [2019-02-26 10:34:15] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f63adf5d20bbfbd06d7896983ea233ad"} - -0 DEBUG [2019-02-26 10:34:58] Request: -1 DEBUG [2019-02-26 10:34:58] POSThttps://api.weibo.com/oauth2/access_token -105 DEBUG [2019-02-26 10:34:58] Response: -106 DEBUG [2019-02-26 10:34:58] https StatusCode:400 -106 DEBUG [2019-02-26 10:34:58] Server:nginx/1.6.1 -106 DEBUG [2019-02-26 10:34:58] Date:Tue, 26 Feb 2019 02:35:02 GMT -106 DEBUG [2019-02-26 10:34:58] Transfer-Encoding:chunked -106 DEBUG [2019-02-26 10:34:58] Connection:keep-alive -106 DEBUG [2019-02-26 10:34:58] Pragma:No-cache -106 DEBUG [2019-02-26 10:34:58] Cache-Control:no-cache -107 DEBUG [2019-02-26 10:34:58] Expires:Thu, 01 Jan 1970 00:00:00 GMT -111 WARN [2019-02-26 10:34:58] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -112 DEBUG [2019-02-26 10:34:58] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:f63adf5d20bbfbd06d7896983ea233ad"} - -108655 DEBUG [2019-02-26 10:36:47] Request: -108656 DEBUG [2019-02-26 10:36:47] POSThttps://api.weibo.com/oauth2/access_token -108762 DEBUG [2019-02-26 10:36:47] Response: -108762 DEBUG [2019-02-26 10:36:47] https StatusCode:200 -108763 DEBUG [2019-02-26 10:36:47] Server:nginx/1.6.1 -108763 DEBUG [2019-02-26 10:36:47] Date:Tue, 26 Feb 2019 02:36:50 GMT -108763 DEBUG [2019-02-26 10:36:47] Content-Type:application/json;charset=UTF-8 -108763 DEBUG [2019-02-26 10:36:47] Content-Length:137 -108763 DEBUG [2019-02-26 10:36:47] Connection:keep-alive -108763 DEBUG [2019-02-26 10:36:47] Pragma:No-cache -108763 DEBUG [2019-02-26 10:36:47] Cache-Control:no-cache -108763 DEBUG [2019-02-26 10:36:47] Expires:Thu, 01 Jan 1970 00:00:00 GMT -108763 DEBUG [2019-02-26 10:36:47] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -108765 DEBUG [2019-02-26 10:36:47] Request: -108765 DEBUG [2019-02-26 10:36:47] GET:https://api.weibo.com/2/users/show.json -0 DEBUG [2019-02-26 10:37:17] Request: -1 DEBUG [2019-02-26 10:37:17] POSThttps://api.weibo.com/oauth2/access_token -109 DEBUG [2019-02-26 10:37:18] Response: -109 DEBUG [2019-02-26 10:37:18] https StatusCode:400 -109 DEBUG [2019-02-26 10:37:18] Server:nginx/1.6.1 -109 DEBUG [2019-02-26 10:37:18] Date:Tue, 26 Feb 2019 02:37:21 GMT -110 DEBUG [2019-02-26 10:37:18] Transfer-Encoding:chunked -110 DEBUG [2019-02-26 10:37:18] Connection:keep-alive -110 DEBUG [2019-02-26 10:37:18] Pragma:No-cache -110 DEBUG [2019-02-26 10:37:18] Cache-Control:no-cache -110 DEBUG [2019-02-26 10:37:18] Expires:Thu, 01 Jan 1970 00:00:00 GMT -113 WARN [2019-02-26 10:37:18] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -114 DEBUG [2019-02-26 10:37:18] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:afb07a602ee97712335cff65be6df2df"} - -388429 DEBUG [2019-02-26 10:43:46] Request: -388431 DEBUG [2019-02-26 10:43:46] POSThttps://api.weibo.com/oauth2/access_token -0 DEBUG [2019-02-26 16:41:43] Request: -2 DEBUG [2019-02-26 16:41:43] POSThttps://api.weibo.com/oauth2/access_token -425 DEBUG [2019-02-26 16:41:44] Response: -425 DEBUG [2019-02-26 16:41:44] https StatusCode:200 -425 DEBUG [2019-02-26 16:41:44] Server:nginx/1.6.1 -425 DEBUG [2019-02-26 16:41:44] Date:Tue, 26 Feb 2019 08:41:48 GMT -425 DEBUG [2019-02-26 16:41:44] Content-Type:application/json;charset=UTF-8 -425 DEBUG [2019-02-26 16:41:44] Content-Length:137 -425 DEBUG [2019-02-26 16:41:44] Connection:keep-alive -425 DEBUG [2019-02-26 16:41:44] Pragma:No-cache -425 DEBUG [2019-02-26 16:41:44] Cache-Control:no-cache -425 DEBUG [2019-02-26 16:41:44] Expires:Thu, 01 Jan 1970 00:00:00 GMT -429 DEBUG [2019-02-26 16:41:44] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -433 DEBUG [2019-02-26 16:41:44] Request: -433 DEBUG [2019-02-26 16:41:44] GET:https://api.weibo.com/2/users/show.json -0 DEBUG [2019-02-26 16:45:09] Request: -0 DEBUG [2019-02-26 16:45:09] POSThttps://api.weibo.com/oauth2/access_token -87 DEBUG [2019-02-26 16:45:09] Response: -87 DEBUG [2019-02-26 16:45:09] https StatusCode:400 -88 DEBUG [2019-02-26 16:45:09] Server:nginx/1.6.1 -88 DEBUG [2019-02-26 16:45:09] Date:Tue, 26 Feb 2019 08:45:13 GMT -88 DEBUG [2019-02-26 16:45:09] Transfer-Encoding:chunked -88 DEBUG [2019-02-26 16:45:09] Connection:keep-alive -88 DEBUG [2019-02-26 16:45:09] Pragma:No-cache -88 DEBUG [2019-02-26 16:45:09] Cache-Control:no-cache -88 DEBUG [2019-02-26 16:45:09] Expires:Thu, 01 Jan 1970 00:00:00 GMT -90 WARN [2019-02-26 16:45:09] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -90 DEBUG [2019-02-26 16:45:09] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:2982458f8cf51e7a56fc0cc45c9de1e1"} - -0 DEBUG [2019-02-26 17:04:58] Request: -1 DEBUG [2019-02-26 17:04:58] POSThttps://api.weibo.com/oauth2/access_token -136 DEBUG [2019-02-26 17:04:58] Response: -136 DEBUG [2019-02-26 17:04:58] https StatusCode:200 -136 DEBUG [2019-02-26 17:04:58] Server:nginx/1.6.1 -137 DEBUG [2019-02-26 17:04:58] Date:Tue, 26 Feb 2019 09:05:02 GMT -137 DEBUG [2019-02-26 17:04:58] Content-Type:application/json;charset=UTF-8 -137 DEBUG [2019-02-26 17:04:58] Content-Length:137 -137 DEBUG [2019-02-26 17:04:58] Connection:keep-alive -137 DEBUG [2019-02-26 17:04:58] Pragma:No-cache -137 DEBUG [2019-02-26 17:04:58] Cache-Control:no-cache -137 DEBUG [2019-02-26 17:04:58] Expires:Thu, 01 Jan 1970 00:00:00 GMT -141 DEBUG [2019-02-26 17:04:58] {"access_token":"2.00eW2yKGOppxkD155f9e33adrJhDjC","remind_in":"157679999","expires_in":157679999,"uid":"5658942780","isRealName":"true"} - -145 DEBUG [2019-02-26 17:04:58] Request: -146 DEBUG [2019-02-26 17:04:58] GET:https://api.weibo.com/2/account/get_uid.json -493151 DEBUG [2019-02-26 17:13:11] Request: -493152 DEBUG [2019-02-26 17:13:11] POSThttps://api.weibo.com/oauth2/access_token -493200 DEBUG [2019-02-26 17:13:11] Response: -493200 DEBUG [2019-02-26 17:13:11] https StatusCode:400 -493200 DEBUG [2019-02-26 17:13:11] Server:nginx/1.6.1 -493201 DEBUG [2019-02-26 17:13:11] Date:Tue, 26 Feb 2019 09:13:15 GMT -493201 DEBUG [2019-02-26 17:13:11] Transfer-Encoding:chunked -493201 DEBUG [2019-02-26 17:13:11] Connection:keep-alive -493201 DEBUG [2019-02-26 17:13:11] Pragma:No-cache -493201 DEBUG [2019-02-26 17:13:11] Cache-Control:no-cache -493201 DEBUG [2019-02-26 17:13:11] Expires:Thu, 01 Jan 1970 00:00:00 GMT -493201 WARN [2019-02-26 17:13:11] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. -493201 DEBUG [2019-02-26 17:13:11] {"error":"invalid_grant","error_code":21325,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"invalid authorization code:cf835083a6664d45bce6d8d1e49bb06b"} -