|
@@ -25,12 +25,6 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.servlet.http.HttpSession;
|
|
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;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Controller
|
|
@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());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|