spring-boot - 在骆驼3中正确设置http套接字超时
问题描述
拥有这个 Spring-XML 配置
<to uri="http://localhost:8088/?httpMethod=GET&bridgeEndpoint=true&socketTimeout=10000&throwExceptionOnFailure=false"/>
我socketTimeout is a custom option that is not part of the Camel component
在 IntelliJ IDEA 中收到警告。
事实上,在骆驼文档中,我在组件选项中看到了 socketTimeout,上面代码片段中的其他选项在查询参数中,所以问题是是否应该以不同的方式指定 socketTimeout?正确的方法是什么?
提前致谢
解决方案
它被定义为组件选项,因此不能从端点 uri 使用。如果您使用的是 spring,则可以执行类似https://camel.apache.org/manual/latest/configuring-camel.html#ConfiguringCamel-WorkingwithSpringXML之类的操作来配置组件的超时。
推荐阅读
- .net - 如何将 Dafny 代码与 C# 程序集链接
- r - r 逐行比较两列中的文本
- python-3.x - 导入 eventlet SSL 导致:ModuleNotFoundError: No module named 'OpenSSL.tsafe'
- json - 直到循环出现错误(powershell)
- java - 重新编译项目时如何在Java中保存系统状态并恢复系统?
- .net-core-3.1 - 在 .net core 3.1 中读取请求正文
- terraform - 创建 terraform hcl 变量作为地图
- python - 在python中删除列名中不需要的字符
- angular - 使用我自己的库时找不到模块或其对应的类型声明
- image-processing - 视差图像的灰度范围不断波动