我从 spring boot 1.5 迁移到 2.0 并使用了 jasper report。迁移有一个问题是 The import org.springframework.web.servlet.view.jasperreports cannot be resolved。我的代码是
import org.springframework.web.servlet.view.jasperreports.JasperReportsMultiFormatView;
我可以看看 java 包是如何更改的吗?要下定决心。
最佳答案
Spring Boot 2.0 使用 Spring Framework 5.0,其中删除了对 JasperReports 的支持。包 org.springframework.web.servlet.view.jasperreports
不再可用。
根据 Upgrading to Spring Framework 5.x :
The Spring Framework no longer supports: Portlet, Velocity, JasperReports, XMLBeans, JDO, Guava (replaced by the Caffeine support). If those are critical to your project, you should stay on Spring Framework 4.3.x (supported until 2020). Alternatively, you may create custom adapter classes in your own project (possibly derived from Spring Framework 4.x).
关于java - Spring Boot 2 JasperReportsMultiFormatView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49590453/