Can not find 'Converter' support class LocalDateTime.
时间: 2023-10-28 08:56:45 浏览: 237
这个报错是由于在使用EasyExcel库时,没有找到支持LocalDateTime类型的转换器。解决这个问题的方法是在对应的LocalDateTime日期格式属性上添加注解,并指定一个转换器。例如,可以使用@ExcelProperty注解来指定转换器,如下所示:
```java
@ExcelProperty(value = "开始时间", converter = LocalDateStringConverter.class)
private LocalDateTime startTime;
```
其中,LocalDateStringConverter是一个自定义的转换器类,用于将LocalDateTime类型转换为字符串。通过这样的方式,EasyExcel库就能正确地处理LocalDateTime类型的属性了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [java使用EasyExcel生成表格及Can not find ‘Converter‘ support class LocalDateTime错误](https://blog.csdn.net/weixin_43364428/article/details/119915620)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [SpringBoot使用excel表格导出数据时 Can not find ‘Converter‘ support class LocalDateTime](https://blog.csdn.net/weixin_53815644/article/details/123085927)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文