Browse Source

Merge remote-tracking branch 'origin/master'

xiongzhu 7 years ago
parent
commit
af7ee22326
1 changed files with 0 additions and 25 deletions
  1. 0 25
      src/main/java/com/izouma/awesomeadmin/web/WeiXinController.java

+ 0 - 25
src/main/java/com/izouma/awesomeadmin/web/WeiXinController.java

@@ -25,12 +25,6 @@ import org.springframework.web.servlet.ModelAndView;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
 import java.util.Map;
 
 @Controller
@@ -222,23 +216,4 @@ public class WeiXinController {
     }
 
 
-    public static JSONObject loadJSON(String url) {
-
-        StringBuilder json = new StringBuilder();
-        try {
-            URL oracle = new URL(url);
-            URLConnection yc = oracle.openConnection();
-            BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream(), "UTF-8"));
-            String inputLine = null;
-            while ((inputLine = in.readLine()) != null) {
-                json.append(inputLine);
-            }
-            in.close();
-        } catch (MalformedURLException e) {
-        } catch (IOException e) {
-        }
-        return new JSONObject(json.toString());
-    }
-
-
 }