你需要在请求头的accept属性设置为application/json; 使用produces:produces="application/json" 或者在swagger config配置文件里面 202037-112350.jpg