i upgraded to micronaut 4.6.0 and java 17
this is the api :
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@Post("/test")
public T test(@Header("username") String username, @RequestAttribute("data") String data,
@Nullable CompletedFileUpload imageFile1,@Nullable CompletedFileUpload imageFile2 ){
….
}
while hitting the api i am getting “message”: “Cannot convert type [class io.micronaut.http.server.netty.MicronautHttpData$AttributeImpl] to target type: interface io.micronaut.http.multipart.CompletedFileUpload. Considering defining a TypeConverter bean to handle this case.”
how to resolve this issue ?
New contributor
jim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.