简体   繁体   中英

Quarkus-resteasy-multipart could not find writer for content-type multipart/form-data type

I am working on a project on which server-side I have used REST service for my APIS. If I use the REST service in the main function of a class, it is working fine. But when I calling it from a servlet that using Quarkus-resteasy, it throws exceptions. The exceptions are as follows.

javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: javax.ws.rs.ProcessingException: RESTEASY003215: could not find writer for content-type multipart/form-data type: org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput

Quarkus messed up Provider discovery. If you add it manually, the writer can be found. eg:

@Provider
@Produces({"multipart/form-data"})
public class MultiformWriterProvider extends MultipartFormDataWriter{}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM