继续之前说的功能开发问题:
由于使用的Camel配置方式,在camel中直接是指定的了接口的URL,如图:
接口是使用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: HttpMessage@0x7b6b7dd8. 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的xml dsl配置方式找了很久也没有找到配置的属性(也不知道有没有,在寻找中...),如有大侠知道,可在下面评论中写一下,非常感谢!