ETKORP CouchDB渲染附件

问题描述

我的附件记录在沙发上。

要恢复,我使用以下代码

@RequestMapping(value = "/getDocument",method = RequestMethod.GET)
    public ResponseEntity<String> getDocument(@RequestParam(value = "document_id",defaultValue = "") String document_id,@RequestParam(value = "anexo_id",defaultValue = "") String attch_id) throws IOException {

        document_id = URL.decodeParam(document_id);
        attch_id = URL.decodeParam(attch_id);
        
        MyRepository repo;
        
        try {
            repo = new WebhookRepository(Webhook.class,this.service.getDb());
            AttachmentInputStream attachment = this.service.getAttachment(repo,document_id,attch_id);
            
            
             
            
            return ResponseEntity.ok().body(attachment.toString());
            
        } catch (dbaccessException e) {
            ResponseEntity.ok().body(e.toString());
            
        } catch (MalformedURLException e) {
            // Todo Auto-generated catch block
            e.printstacktrace();
        }
        return null;
        
        
    }

但是邮递员收到的答案是:org.ektorp.AttachmentInputStream@7a32fb41

我需要返回渲染的图像或附件中记录的base64字符串。

如何制作?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)