将名称添加到春季资源对象
嗨,我正在调用一个端点,该端点返回带有bytearray的弹簧资源,我需要将其传递给另一个期望弹簧资源对象的端点。 但是,不断的资源没有文件名。即将发出的资源预计将有一个文件名,因为它将其转化为EMAI附件。
在此处添加文件名的最佳方法是什么? 我一直在尝试将资源复制到文件中,而不是再次将该文件读为一个新资源,但它一直告诉MET,该位置不存在该文件。
Hi i am calling an endpoint that returns a spring resource with a byteArray in it and i need to pass this along to another endpoint that expects a spring Resource object.
But the incomming resource has no fileName. and the outgoing resource expects a filename to be present as it translates this to an emai attachment.
What is the best way to add a file name here?
I have been trying to copy the Resource to File and than read that file again into a new resource but it keeps telling met that the file does not exist in that location.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在控制器方法中,您设置文件名
和响应实体中
In the controller method you set the filename
and in the response entity