I'm using this code to upload files in my java application using resteasy and it works perfectly.
import javax.ws.rs.FormParam;
import org.jboss.resteasy.annotations.providers.multipart.PartType;
public class FileUploadForm {
public FileUploadForm() {
}
private byte[] data;
public byte[] getData() {
return data;
}
@FormParam("uploadedFile")
@PartType("application/octet-stream")
public void setData(byte[] data) {
this.data = data;
}
}
Now I want to do the same thing by using spring boot and spring rest.
I searched a lot about how to use @FormParam and @PartType in spring rest but I didn't find anything.
So how can I use this class to upload my files? What is the equivalent of @PartType and @FormParam in spring rest?