继续之前说的功能开发问题:

   由于使用的Camel配置方式,在camel中直接是指定的了接口的URL,如图:
Apache Camel与Spring Boot集成开发HTTP接口Post请求参数Body无法传入问题

接口是使用Post方式,如果接口中有需要传入JSON方式的参数也有问题:
org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: {id=1} of type: java.util.LinkedHashMap on: [email protected] Caused by: No type converter available to convert from type: java.util.LinkedHashMap to the required type: java.io.InputStream with value {id=1}. Exchange[ID-simonMeng-1570589490366-0-3]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: java.util.LinkedHashMap to the required type: java.io.InputStream with value {id=1}]

如图:
Apache Camel与Spring Boot集成开发HTTP接口Post请求参数Body无法传入问题

真的是一波三折啊,这个Apache Camel的xml dsl配置方式找了很久也没有找到配置的属性(也不知道有没有,在寻找中...),如有大侠知道,可在下面评论中写一下,非常感谢!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-07-07
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案