Spring 5 份报告

Spring 5 Reporting

在 Spring Framework 5 的变更日志中,它声明他们删除了 JasperReports 的兼容性。我可以使用哪种与 Spring FW 5 兼容的报告工具?

https://jira.spring.io/browse/SPR-13294 来自票

we rather recommend native use of the JasperReports API in Spring MVC handler methods, generating reports from specifically designed RESTful endpoints. We are dropping our now semi-useless JasperReports view class hierarchy as of Spring Framework 5.0. Note that our existing support against the deprecated JRExporter API remains around in the Spring Framework 4.3.x line until 2019, in particular for existing applications. However, even with 4.3, native use of the JasperReports API is worth considering.

您应该使用 JasperReport 但避免使用 JRExporter。因此,只需手动添加所有 JasperReport 库并在需要时创建报告即可。 Jasper Report 生成代码可以由您自己的端点调用。