Compare commits

..

No commits in common. "38a72d5ea2ec4db645481a206733752e444485f5" and "629678241f10644a51235e3565626ef47b12297e" have entirely different histories.

2 changed files with 0 additions and 98 deletions
src/main/java/com/guwan/backend

View File

@ -305,64 +305,4 @@ public class CommonController {
}
@PostMapping("/testPart")
public void testPart(@RequestPart(value = "file", required = false) MultipartFile file,
@RequestPart(value = "str1", required = false) String str1,
@RequestPart(value = "f1", required = false) String f1) {
String s = null;
if (file != null) {
s = minioUtil.uploadFile("temp", file);
}
System.out.println("s = " + s);
System.out.println("str1 = " + str1);
System.out.println("f1 = " + f1);
}
@PostMapping("/testPartOfFloat")
public void testPartOfFloat(@RequestPart(value = "file", required = false) MultipartFile file,
@RequestPart(value = "str1", required = false) String str1,
@RequestPart(value = "f1", required = false) Float f1) {
String s = null;
if (file != null) {
s = minioUtil.uploadFile("temp", file);
}
System.out.println("s = " + s);
System.out.println("str1 = " + str1);
System.out.println("f1 = " + f1);
}
@PostMapping("/testParam")
public void testParm(@RequestPart(value = "file", required = false) MultipartFile file,
@RequestParam(value = "str1", required = true) String str1,
@RequestParam(value = "f1", required = false) Float f1) {
String s = null;
if (file != null) {
s = minioUtil.uploadFile("temp", file);
}
System.out.println("s = " + s);
System.out.println("str1 = " + str1);
System.out.println("f1 = " + f1);
}
}

View File

@ -1,38 +0,0 @@
/*
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;
}
}*/