admin管理员组

文章数量:1123145

I am using Quarkus - 3.17.6 with Rest API. For smaller payload the application is working as expected, however if the payload request json is more than 100 MB the request is not even reaching the route code and responds with "400 Bad Request".

I have also configured the required application.properties.

quarkus.management.limits.max-body-size=2G
quarkus.http.limits.max-form-attribute-size=2000M
quarkus.http.limits.max-body-size = 4G

Below is the sample Json Payload:

[
    {
        "FileType": "Event",
        "FileContents" : "\r\n import java.text.SimpleDateFormat  import java.util.ArrayList\r\n bla bla "
    },
    {
        "FileType": "Event1",
        "FileContents" : "\r\n import java.text.SimpleDateFormat bla bla"
    }
  ]

Rest API :

@POST
@Path("/refresh")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response Refresh(List<EngineFile> files){
    System.out.println("refreshEngine");
    return Response.ok("Refresh Complete", MediaType.APPLICATION_JSON).build();
}

Postman Response:

Also, nothing is getting logged in Quarkus application.

From the Quarkus document : , was able to see we need to use inputstream, but coudn't get any link for the same.

Please can someone see if am missing anything.

Or if i can use the Inputsteam or Multi<io.vertx.mutiny.core.buffer.Buffer> , a sample example or link would help for correct use to get List in my application.

本文标签: Quarkus Rest API with Large Payload JsonStack Overflow