Apache camel Camel Bindy(2.21.2)固定长度解组似乎忽略了trim=true注释

Apache camel Camel Bindy(2.21.2)固定长度解组似乎忽略了trim=true注释,apache-camel,bindy,Apache Camel,Bindy,我有一个使用Bindy2.17的类,但在迁移到Camel2.21.2之后,当我解组时,它不再修剪传入的数据 我尝试向记录注释添加一个paddingChar属性,但没有效果,因为我尝试修剪的是空格,所以它应该是默认的paddingChar值 我的班级是这样的 @FixedLengthRecord( header = MyClass.MyHeader.class, footer = MyClass.MyFooter.class, skipHeader = true, skipFooter = tru

我有一个使用Bindy2.17的类,但在迁移到Camel2.21.2之后,当我解组时,它不再修剪传入的数据

我尝试向记录注释添加一个
paddingChar
属性,但没有效果,因为我尝试修剪的是空格,所以它应该是默认的
paddingChar

我的班级是这样的

@FixedLengthRecord( header = MyClass.MyHeader.class, footer = MyClass.MyFooter.class, skipHeader = true, skipFooter = true, ignoreTrailingChars = true, crlf="WINDOWS", paddingChar = ' ' )
public class MyClass{

    @DataField( pos = 1, length = 2, trim = true )
    private String field1;

    @DataField( pos = 2, length = 15, trim = true )
    private String field2;

    @DataField( pos = 3, length = 15, trim = true )
    private String field3;

    @FixedLengthRecord( ignoreTrailingChars = true )
    public static class MyHeader {

    }

    @FixedLengthRecord( ignoreTrailingChars = true)
    public static class MyFooter {

    }

}
修剪的配置方式是否发生了变化,或者我是否缺少其他东西


谢谢

我也有同样的问题。默认情况下,固定长度记录向右对齐。从版本2.18开始,在这种情况下,只修剪记录左侧的填充字符。如果填充字符始终位于右侧,则可以使用align=“L”将记录向左对齐。如果只想修剪与对齐无关的所有内容,可以从版本2.20开始使用align=“B”。以下是相关的更改:

您可以尝试使用较新的版本吗?2.23.1或2.21.5版本由于时间限制不太容易-但我将尝试在不同的环境中安装更高版本,并检查问题是否相同。