我是 Mulesoft 的新手,我正在关注快速入门指南。在第 2 步(https://developer.mulesoft.com/guides/quick-start/developing-your-first-mule-application)中,我需要以这种方式从 URI 接收变量:
[{'id' : attributes.uriParams.productId}]
但是当我尝试我的 GET 时,控制台中出现以下错误:
**消息:“无法将数组 ([{id: "2" as String {class: "java.lang.String"}}]) 强制转换为对象 1| [{'id' : attributes.uriParams.productId}] ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Trace: at main (line: 1, column : 1)" 评估表达式:"[{'id' : attributes.uriParams.productId}]"。错误类型:MULE:EXPRESSION 元素:get:\products(productId):test_daniel-config/processors/1 @ test6_db_connection:test_daniel.xml:133(选择)元素 XML:SELECT product.,CONCAT('["', (GROUP_CONCAT (variant.picture SEPARATOR '","')),'"]') AS 图片,CONCAT('[', GROUP_CONCAT('{"',variant.identifierType, '":"', variant.identifier, '" }'),']') AS identifiersFROM product INNER JOIN variant ON product。uuid = 变体.productUUIDWHERE product.uuid = :id; #[[{'id' : attributes.uriParams.productId}]] *
有任何想法吗?谢谢!