Apache camel SimpleParserException:未知函数:property.fileName
我使用的是Apache Camel 3.0,在解析文件时出现以下错误:Apache camel SimpleParserException:未知函数:property.fileName,apache-camel,camel-sql,Apache Camel,Camel Sql,我使用的是Apache Camel 3.0,在解析文件时出现以下错误: from("file:" + filePath) .routeId("create-ticket") .unmarshal(ticketCsv) .to("jpa:Ticket") .log("Created new ticket with id ${body.id}") .convertBodyT
from("file:" + filePath)
.routeId("create-ticket")
.unmarshal(ticketCsv)
.to("jpa:Ticket")
.log("Created new ticket with id ${body.id}")
.convertBodyTo(String.class)
.setProperty("fileName", simple("${header.CamelFileAbsolutePath}"))
.setProperty("fileContents", body())
.to("sql:INSERT INTO DOCUMENT(document_name, document_contents) VALUES(:#${property.fileName}, :#${property.fileContents})");
例外情况:
org.apache.camel.language.simple.types.SimpleAllegalSyntaxException:
未知函数:位置0${property.fileName}处的property.fileName
${property.xxx}
在2.x中被弃用。使用函数的正确名称${exchangeProperty.xxx}