Message.InboundProperty始终返回字符串-MULE-AnyPoint Studio-APIkit

Message.InboundProperty始终返回字符串-MULE-AnyPoint Studio-APIkit,api,mule,mule-studio,connector,Api,Mule,Mule Studio,Connector,我正在使用RAML+MULE AnypointStudio(APIkit)开发一个API。所以在我的RAML文件中,我定义了这样一个资源 /player post: queryParameters: year: type: integer place: type: string 然后,在导入.raml文件后,我进入AnyPoint Studio,得到了一个带有ASSOCIATED post方法的流。我使用MySQL Con

我正在使用RAML+MULE AnypointStudio(APIkit)开发一个API。所以在我的RAML文件中,我定义了这样一个资源

/player
    post:
        queryParameters:
            year: type: integer
            place: type: string
然后,在导入.raml文件后,我进入AnyPoint Studio,得到了一个带有ASSOCIATED post方法的流。我使用MySQL Conctor插入数据库。问题出在查询中:

INSERT INTO Matches (day,place,max_players)
VALUES (#[message.inboundProperties.'day'],#[message.inboundProperties'place'],
#[message.inboundProperties.'maxPlayers'])
当我调用#[message.inboundProperties.day]时,它返回一个字符串,但我需要一个整数值

我是新来MULE的,所以如果你能告诉我怎么做就太好了


ty

所有查询参数都被视为字符串。但可以使用MEL将其转换为整数。下面是一个在Mel表达式中使用Java将参数解析为int的示例

#[Integer.parseInt(message.inboundProperties.day)]