Apache camel Camel:找不到FormattingOptions类型的合适格式化程序:java.util.List

Apache camel Camel:找不到FormattingOptions类型的合适格式化程序:java.util.List,apache-camel,Apache Camel,我正在尝试将pojo转换为camel中的csv。这是模型 @CsvRecord(separator = ";") public class Model { @DataField(pos = 1) private String t; @DataField(pos = 2) private List<Integer> list; } 但我还是犯了同样的错误。有人能帮我吗 我认为您需要在Jndi中绑定defaultFactoryRegist

我正在尝试将pojo转换为camel中的csv。这是模型

 @CsvRecord(separator = ";")
 public class Model {
     @DataField(pos = 1)
     private String t;
     @DataField(pos = 2)
     private List<Integer> list;
 } 

但我还是犯了同样的错误。有人能帮我吗

我认为您需要在Jndi中绑定defaultFactoryRegistry,在我们的案例中,它是:

java.lang.IllegalArgumentException: Can not findForFormattingOptions a suitable formatter for the type: java.lang.String
这是因为骆驼没有正确启动。重新启动应用程序解决了问题。这是Quarkus应用程序

DefaultFactoryRegistry defaultFactoryRegistry = new DefaultFactoryRegistry();
    defaultFactoryRegistry.register(new ListFormatFactory());
java.lang.IllegalArgumentException: Can not findForFormattingOptions a suitable formatter for the type: java.lang.String