gpt4 book ai didi

java - SpringData 和 mongoDb 超时

转载 作者:行者123 更新时间:2023-12-01 23:23:23 24 4
gpt4 key购买 nike

我发出了一个请求,当我直接在 Mongo 中执行它时,它很快就会给出结果,当我使用 SpringData 执行代码时,它会给出 AsyncRequestTimeoutException (即使在使用索引后问题仍然存在)。

查询:

@Query("{ $or: [{\"product.adr.structures\": { $elemMatch : {\"_id\":?0 , \"depth\" : ?1 }}} , {\"product.ecat.structures\": { $elemMatch : {\"_id\":?0 , \"depth\" : ?1 }}}]}")
Flux<ProductHawk> findByStructureLevel(String structureLevelId , Integer structureLevelType);

我能做什么?请:)

最佳答案

尝试将 spring.mvc.async.request-timeout 属性设置为 -1。通过这种方式,您将在应用程序中禁用超时约束。

关于java - SpringData 和 mongoDb 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58319044/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com