将文件流写入HttpServerResponse,knife4j不能正常的下载文件,只会把文件信息显示出来
Controller层在对应的接口增加knife4j配置
在@ApiOperation注解中加上produces = “application/octet-stream”
java
    @GetMapping("/getWord")
    @ApiOperation(value = "获取word文件",produces = "application/octet-stream" )
    @Permission(rule = PermissionRule.Login)
    public void  getWord(HttpServerResponse res) {
        taskService.getWord(res);
    }
本文作者:Weee
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!