Start here. This is the direct spoken answer to practice first.
Overview
Streaming avoids buffering the entire body, but it changes failure, timeout, and resource-lifetime semantics.
For file-like content, I can return a Resource or ResponseEntity<Resource> so Spring copies it to the response. StreamingResponseBody writes directly to the output stream asynchronously, while ResponseBodyEmitter and SseEmitter support multiple objects or events over time. I set the correct content type and safe content-disposition metadata and avoid reading the whole source into a byte array. The source stream is opened lazily and closed by a clear owner.