Skip to content

Tag: naming

Naming file created by ResourceResponseEntity

In my REST application I’ve got a request which is returning an excel file to a user via return new ResourceResponseEntity(new ByteArrayResource(content) where content is byte[] The problem The problem is the result file is always named the same way that the request method name, which is bad because it would be hard to locate some information in that files