UnnameRow的记录Excel导出实现BaseBean接口实例的属性封装ExcelColumn注解构造对象ExcelColumn注解构造对象ExcelSheet注解的服务方法,自动根据注解创建SheetConfig实例,
并将服务方法中与ExcelSheet注解定义的方法名同名的参数注入到上面的SheetConfig实例中.org.springframework.web.bind.annotation.RestController下的所有类ExcelSheet注解的所有函数Field读写List of all interfaces implemented by the given
class and its superclasses.SheetConfig中的默认值SheetConfig.getAvailableColumns()中根据SheetConfig.defaultIncludeColumns过滤返回默认输出的字段名和顺序SheetConfig.includeColumns)不为空则返回此名单中的字段配置对象
如果字段输出黑名单SheetConfig.excludeColumns不为空则返回不在此名单中的所有字段配置对象
否则返回所有字段;Field by name, breaking scope if requested.SheetConfig中的默认值SheetConfig中的默认值null时根据bean的类型尝试返回对应的PropertyDescriptor实例BaseRow则返回BaseRowPropertyDescriptor实例,
如果能在bean的类中找到同名的成员(Field),返回FieldPropertyDescriptor,
这个过程中如果没有找到指定的成员,会自动尝试对字段名进行驼峰命名(camel-case)和蛇形命名(snake-case)转换来查找成员.SheetConfig)实例,可以通过此实例修改输出配置PropertyUtilsBean.getSimpleProperty(Object, String)MorePropertyUtilsBean.invokeMethod(Method, Object, String, Object[])name 指定字段的读方法setXXXname 指定字段的写方法setXXXreturnValue是否为成功调用JSONObject的Excel导出实现类Map实例的属性封装other中有定义的Excel Sheet配置字段复制到当前对象的对应字段other定义的Excel Column配置对象(PropertyConfig)合并到当前的Column配置对象中,如果存在相同的对象,则以other的为准null时忽略null返回空表null返回空表null或空,则使用SheetConfig.getDefaultExportColumnNames()的返回值PropertyUtilsBean.setSimpleProperty(Object, String, Object)MorePropertyUtilsBean.invokeMethod(Method, Object, String, Object[])UnnameRow记录JSONObjectJSONObjectnull则忽略Copyright © 2022. All Rights Reserved.