直接上代码
// 调用接口方法 ApiResp resp = service.action(from); // 没有数据输出空 resp = resp == null ? new ApiResp(from) : resp; // 调试日志 if (ApiUtils.DEBUG) { log.info("API DEBUG ACTION \n[from=" + from + "]" // + "\n[resp=" + JsonKit.toJson(resp) + "]" // + "\n[time=" + (System.currentTimeMillis() - start) + "ms]"); } renderJson("001,1002"+JsonKit.toJson(resp));
import:
import com.jfinal.kit.JsonKit;