41.4.2. unmarshalling

unmarshaller 是通用的。要取消总结,您可以使用任何 BarcodeDataFormat 实例。如果您有两个实例,一个用于(重新生成)QR-Code,另一个用于 PDF417,这无关紧要。

from("file://barcode_in?noop=true")
  .unmarshal(code) // for unmarshalling, the instance doesn't matter
  .to("mock:out");

如果将上述 QR-Code 镜像粘贴到"barcode_in"文件夹中,您应该找到此 为测试消息!您可以作为标头变量查找 barcode 数据格式:

名称类型描述

BarcodeFormat

字符串

com.google.zxing.BarcodeFormat 的值。