Код: Выделить всё
@GetMapping(path = "/test", produces = "application/json")
public StreamingResponseBody test(@RequestParam(value = "var1") final String test)
throws IOException{
return new StreamingResponseBody() {
@Override
public void writeTo(final OutputStream outputStream) throws IOException{
try {
// Some operations..
} catch (final SomeCustomException e) {
throw new IOException(e);
}
}
};
}
Подробнее здесь: https://stackoverflow.com/questions/566 ... sponsebody
Мобильная версия