Ответы REST API проекта Quarkus зависают, если присутствует зависимость quarkus-amazon-lambda-httpJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Гость
 Ответы REST API проекта Quarkus зависают, если присутствует зависимость quarkus-amazon-lambda-http

Сообщение Гость »


I have the following minimal Quarkus project example. Without the

Код: Выделить всё

quarkus-amazon-lambda-http
dependency, the project returns the correct response when the GET endpoint is called, and even a much larger one (10,000 items).
However when the

Код: Выделить всё

quarkus-amazon-lambda-http
dependency is added to the size of the possible response is severely limited. The code will only run if the response size if very small (it works with 50 items, but not 100).
When I run the project locally, the response code 200 OK is returned, but no body, and it just hangs trying to retrieve body indefinitely (tried through Postman, browser, curl).
I have tried with both reactive and non-reactive dependencies for the pom.xml and there is the same result with both. I have tried to use other versions of Quarkus also, such as 3.6.0.
Resource:

Код: Выделить всё

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/cars")
public class ExampleResource {

@GET
@Produces(MediaType.APPLICATION_JSON)
public List cars() {
List carList = new ArrayList();

//works if there are only 50 items in list
//without lambda dependency, works if there 10000+
for (int i = 0; i < 100; i++) {
carList.add(new Car(Long.valueOf(i), "Car(" + i + ")", Double.valueOf(i) * 100, Double.valueOf(i) + 100,
Double.valueOf(i), new Date(), new Date()));
}

return carList;
}
}
Model object:

Код: Выделить всё

@Data
@AllArgsConstructor
public class Car {
private Long id;
private String name;
private Double weight;
private Double length;
private Double width;
private Date dateBuilt;
private Date dateAdded;
}
pom.xml file dependencies and versions:

Код: Выделить всё

3.11.0
17
UTF-8
UTF-8
quarkus-bom
io.quarkus.platform
3.6.4
true
3.1.2




${quarkus.platform.group-id}
${quarkus.platform.artifact-id}
${quarkus.platform.version}
pom
import





io.quarkus
quarkus-arc


io.rest-assured
rest-assured
test


org.projectlombok
lombok
1.18.30


io.quarkus
quarkus-resteasy-reactive-jackson


io.quarkus
quarkus-resteasy-reactive-jsonb


io.quarkus
quarkus-amazon-lambda-http




Источник: https://stackoverflow.com/questions/777 ... dependency
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»