alibaba / alibaba/fastjson2

springboot添加FastJsonHttpMessageConverter后使用文件下载的接口会报错

Open
#2,845 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class org.springframework.core.io.InputStreamResource] with preset Content-Type 'application/octet-stream']

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported file-download interface after adding FastJsonHttpMessageConverter, using the HttpMessageNotWritableException as the initial failure signal. Trace how Spring Boot selects a converter for InputStreamResource with Content-Type application/octet-stream; done means the file download completes without the converter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.