0
我使用這個代碼上傳使用resteasy
在我的Java應用程序文件和它完美的作品。彈簧安置:上傳文件
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;
}
}
現在我想通過使用彈簧靴和彈簧休息做同樣的事情。 我搜索了很多關於如何在春天休息時使用@FormParam
和@PartType
,但我沒有找到任何東西。
所以,我怎樣才能使用這個類來上傳我的文件?彈簧休息時相當於@PartType
和@FormParam
?
是的。從這個參數你將獲得該文件對象的所有可能的信息。 –