fix: multipart 解析失败时返回统一的 400 提示
Summary
-
MultipartException在定位 Controller 之前抛出,带RestController限定的CommonExceptionSupport接不住,请求会落到 Spring Boot 默认 500。 - 新增不带限定的
MultipartExceptionSupport,返回统一业务响应:status=400,文案为「请求格式错误,请使用 application/json」。
Test plan
-
对
@RequestBody接口(如POST /box/v1/_box_login)以multipart/form-data且不带 boundary 发请求,响应为业务 400,不再是默认Internal Server Error -
同接口用
application/json正常请求不受影响