コード例 #1
0
 private String buildJsonResult(Object result) {
   StringBuilder sb = new StringBuilder();
   sb.append("<script type=\"application/javascript\">")
       .append("\nreplace(\"")
       .append(pipeProxy.getKey())
       .append("\",\'")
       .append(result.toString().replaceAll("\n", ""))
       .append("\');\n</script>");
   return sb.toString();
 }
コード例 #2
0
 @Override
 public void run() {
   Object result = syncPipeExecutor.execute(pipeProxy);
   // 构造script输出
   renderResult.put(pipeProxy.getKey(), buildJsonResult(result));
 }