From 6d58ee1f52f851a240e946ba863a23c0fd08c292 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 16 五月 2019 17:16:04 +0800 Subject: [PATCH] 随机动态用户 --- fanli/src/main/java/com/yeshi/fanli/controller/TestController.java | 62 +++++++++++++++--------------- 1 files changed, 31 insertions(+), 31 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/TestController.java b/fanli/src/main/java/com/yeshi/fanli/controller/TestController.java index c1e14c9..ab3dd74 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/TestController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/TestController.java @@ -199,7 +199,38 @@ out.print("<script>yestv.finishPage();</script>"); out.close(); } + + + /** + * 娓呴櫎缂撳瓨 + * + * @param out + */ + @RequestMapping(value = "removeCache") + public void removeCache(PrintWriter out) { + ehCacheCacheManager.getCacheManager().clearAll(); + } + @RequestMapping(value = "testConfig") + public void getTestConfig(PrintWriter pw) { + pw.print(configService.get("test")); + } + + @RequestMapping(value = "testDaTaoKe") + public void getTestDaTaoKe(PrintWriter pw) { + try { + Document doc = Jsoup.connect("http://www.dataoke.com/brandFeature").get(); + Elements els = doc.getElementsByTag("script"); + for (int i = 0; i < els.size(); i++) { + if (els.get(i).html().contains("var brandData")) { + pw.print(els.get(i).html().replace("var brandData =", "").trim().split("};")[0] + "}"); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } + @RequestMapping(value = "insetDynamicInfo") public void insetDynamicInfo(PrintWriter out) { String content= "emoji鍏竴鍎跨鑺傛潵浜哱r\n" + @@ -243,35 +274,4 @@ } - /** - * 娓呴櫎缂撳瓨 - * - * @param out - */ - @RequestMapping(value = "removeCache") - public void removeCache(PrintWriter out) { - ehCacheCacheManager.getCacheManager().clearAll(); - } - - @RequestMapping(value = "testConfig") - public void getTestConfig(PrintWriter pw) { - pw.print(configService.get("test")); - } - - @RequestMapping(value = "testDaTaoKe") - public void getTestDaTaoKe(PrintWriter pw) { - try { - Document doc = Jsoup.connect("http://www.dataoke.com/brandFeature").get(); - Elements els = doc.getElementsByTag("script"); - for (int i = 0; i < els.size(); i++) { - if (els.get(i).html().contains("var brandData")) { - pw.print(els.get(i).html().replace("var brandData =", "").trim().split("};")[0] + "}"); - } - } - - } catch (IOException e) { - e.printStackTrace(); - } - - } } -- Gitblit v1.8.0