public void outputToJSON()

in solution/ack/solutions/IAM/OIDC/java_spring/src/main/java/org/hz/minigroup/common/utils/BaseController.java [17:30]


    public void outputToJSON(HttpServletResponse response, Object result) {
        response.setContentType("application/json;charset=UTF-8");
        try {
            if (null != result) {
                // String resultString = JsonUtils.toJsonStringForWeb(result);
                String resultString = JsonUtils.toJsonStringWithDatetime(result);
                response.setContentLength(resultString.getBytes("UTF-8").length);
                response.getWriter().write(resultString);
            }
            response.flushBuffer();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }