mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
bugfix: 处理二进制数据
This commit is contained in:
@@ -7,7 +7,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||
|
||||
@@ -30,7 +29,9 @@ public class RResponseBodyAdvice implements ResponseBodyAdvice<Object> {
|
||||
if (!selectedContentType.includes(MediaType.APPLICATION_JSON)) {
|
||||
return body;
|
||||
}
|
||||
|
||||
if (body instanceof byte[]) {
|
||||
return body;
|
||||
}
|
||||
|
||||
if (body instanceof R<?>) {
|
||||
return body;
|
||||
|
||||
Reference in New Issue
Block a user