It looks like Spring Boot has a specific API for implementing streaming responses. Maybe this is what you should be using.
https://dzone.com/articles/streaming-data-with-spring-boot-restful-web-servic-1