这是我的 BeanIO xml 配置文件:
<beanio xmlns="http://www.beanio.org/2011/01"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.beanio.org/2011/01 http://www.beanio.org/2011/01 /mapping.xsd">
<stream name="Test" format="delimited">
<record name="TestRow" minOccurs="1" maxOccurs="unbounded" class="com.company.TestRow">
<field name="transactionDate" type="date" format="MM/dd/yyyy"/>
<field name="userId" type="string"/>
<field name="clientName" type="string"/>
</record>
</stream>
</beanio>
它的问题是我需要由调用此 xml 文件来解析文件的类动态设置“MM/dd/yyyy”。因为日期格式取决于用户设置。
可以以某种方式完成吗?