yujian
2019-05-20 c4d752a1d340652d9c7d2abb5abff65cdee40d69
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();
      }
   }
}