资 源 简 介
BeanFiles is a java library for importing and exporting javabeans to/from various file formats. Right now, it only supports importing from csv using opencsv and xls using POI. Check out the examples.
Beanfiles aims to facilitate type conversion and multiple input/output formats while reusing some of the underlying translation components.
The library currently supports importing only, but has some useful features. It supports the following:
No configuration (if column headers match bean property names)
Property Mapping (if column headers do not match bean property names)
Nested property resolutions (bean.childBean.property.whatever)
Simple wildcard mappings (image* will build a list of strings where column header is imageXyz)
Easily add custom translators (for instance a column is an id, and the bean property is a lookup)
A nice use-case is creating beans with th