39 lines
1005 B
Java
39 lines
1005 B
Java
/*
|
|
package com.guwan.backend.converter;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
@Component
|
|
public class MultipartJackson2HttpMessageConverter extends AbstractJackson2HttpMessageConverter {
|
|
|
|
*/
|
|
/**
|
|
* converter for support http request with header content-type: multipart/form-data
|
|
*//*
|
|
|
|
public MultipartJackson2HttpMessageConverter(ObjectMapper objectMapper) {
|
|
super(objectMapper, MediaType.APPLICATION_OCTET_STREAM);
|
|
}
|
|
|
|
@Override
|
|
public boolean canWrite(Class<?> clazz, MediaType mediaType) {
|
|
return false;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean canWrite(Type type, Class<?> clazz, MediaType mediaType) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected boolean canWrite(MediaType mediaType) {
|
|
return false;
|
|
}
|
|
}*/
|