Feign调用文件下载服务接口实例
Feign调用文件下载服务接口实例
服务提供者:
@PostMapping(value = “/downLoadFile”)
public void downloadFile(@RequestParam String path, HttpServletResponse response) {
File file = new File(path);
FileUtil.fileDownload(response, file, false);
}
FileUtil工具类
import org.slf4j.Logg
转载
2021-04-30 11:22:48 ·
1050 阅读 ·
3 评论