Jax-RS Multipart响应 [英] Jax-RS Multipart response

查看:136
本文介绍了Jax-RS Multipart响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的Web应用程序传递一个多部分的响应.我想通过使用Jax-RS来满足此要求.是否可以通过Jax-RS提供多部分HTTP响应?为此,我是否必须使用MessageBodyWriter并自己实现它,或者我可以将任何类用于多部分响应.

I want to deliver a multipart response from my web application. I'd like to fullfil this requirement by using Jax-RS. Is it possible to provide a Multipart HTTP-Response with Jax-RS? Do I have to use MessageBodyWriter for this purpose and implement this on my own, or is there any class I can use for multipart responses.

非常感谢.

推荐答案

泽西岛中,您可以使用模块,使您的生活更轻松.请遵循有关此主题的文档:《泽西岛用户指南》中的 Multipart 部分,或阅读看看可用的示例 multipart-webapp .

In Jersey you can use jersey-media-multipart module to make your life easier. Follow the documentation on this topic: Multipart section in Jersey User Guide or take a look at the available example multipart-webapp.

这篇关于Jax-RS Multipart响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆