gpt4 book ai didi

apache-camel - SimpleParserException : Unknown function: property. 文件名

转载 作者:行者123 更新时间:2023-12-02 00:08:51 34 4
gpt4 key购买 nike

我正在使用 Apache Camel 3.0,在解析文件时出现此错误:

    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})");

异常(exception):

org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: Unknown function: property.fileName at location 0 ${property.fileName}

最佳答案

${property.xxx} 在 2.x 中已弃用。使用函数的正确名称 ${exchangeProperty.xxx}

更多改动可以查看in the migration guide

关于apache-camel - SimpleParserException : Unknown function: property. 文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59713811/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com