@ResponseExcel(classFieldNames = {"name", "age", "address"}) 
@RequestMapping("/list")
public List list() {
return listUsers();
}

其中,使用了 ResponseExcel 注解并指明实体类的字段,轻松的将这些字段转化为了 Excel 文件下载。

原理

GitHub:https://github.com/gaoice/easyexcel-spring-boot-starter

欢迎 star 。

 

Spring Boot 中使用一个注解轻松将 List 转换为 Excel 下载

相关文章:

  • 2021-05-15
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2021-12-15
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2021-07-14
  • 2021-08-20
  • 2021-06-20
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案