2017-08-06 87 views

回答

1

你可以这样返回Resource实例:

@GetMapping("/file") 
Mono<Resource> file() { 
    //Create a ClassPathResource, for example 
} 

注意,这个自动支持字节范围的HTTP请求。