Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当 csv 文件中不存在预期的标头字段时,是否可以抛出异常,同时通过单义性解析器解析它
您是否将文件处理成java bean?如果是这种情况,请在您的BeanProcessor实例上调用setStrictHeaderValidationEnabled(true),它将根据使用@Parsed注释注释的字段验证输入标头。
BeanProcessor
setStrictHeaderValidationEnabled(true)
@Parsed