Skip to content

Commit

Permalink
[del] converter 주석처리
Browse files Browse the repository at this point in the history
  • Loading branch information
bo-ram-bo-ram committed Feb 22, 2024
1 parent 47a9cd9 commit e2fa7c4
Showing 1 changed file with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
package com.dontbe.www.DontBeServer.common.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;
}
}
//package com.dontbe.www.DontBeServer.common.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;
// }
//}

0 comments on commit e2fa7c4

Please sign in to comment.