后端生成图片并显示到页面

1、前端部分:前端

<img style="position: absolute; top: 0px; left: 0px;" src="http://localhost:8000/queryProPlan1?processId=60030">

2、后端参考后端

       InputStream imageStream = diagramGenerator.generatePngDiagram(bpmnModel);
        // 输出资源内容到相应对象
        byte[] b = new byte[1024];
        int len;
        while ((len = imageStream.read(b, 0, 1024)) != -1) {
            response.getOutputStream().write(b, 0, len);
        }
相关文章
相关标签/搜索