专业的编程技术博客社区

网站首页 > 博客文章 正文

十年架构师之路——整合FineReport到Spring Boot项目篇

baijin 2024-09-11 00:46:19 博客文章 7 ℃ 0 评论

最新需要用的最新的finerepot整合到springboot项目,成功整合流程如下

1.先要把jar包的整合到MAVEN里,安装路径的web-inf/lib里去整合这6个



call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-core-9.0.jar -DgroupId=com.fr -DartifactId=fr-core -Dversion=9.0 -Dpackaging=jar

call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-report-9.0.jar -DgroupId=com.fr -DartifactId=fr-report -Dversion=9.0 -Dpackaging=jar

call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-third-9.0.jar -DgroupId=com.fr -DartifactId=fr-third -Dversion=9.0 -Dpackaging=jar

call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-performance-9.0.jar -DgroupId=com.fr -DartifactId=fr-performance -Dversion=9.0 -Dpackaging=jar

call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-platform-9.0.jar -DgroupId=com.fr -DartifactId=fr-platform -Dversion=9.0 -Dpackaging=jar

call mvn install:install-file -Dfile=H:\FineReport_9\WebReport\WEB-INF\lib\fr-chart-9.0.jar -DgroupId=com.fr -DartifactId=fr-chart -Dversion=9.0 -Dpackaging=jar

2.整合完后,就需要在项目中添加


这里要把web的配置放在之上(坑了我一次)

然后springboot自己用的内嵌tomcat,默认打包成jar来启动,但是jar无法访问到FR,所以必须改






然后修改启动方式

同级目录下创建



public class SpringbootStartApplication extends SpringBootServletInitializer {

@Override

protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {

return builder.sources(WbsProductApplication.class);

}

}

原本启动项目加入



好吧,可以开心启动并使用FR的iframe了

点击获取更多架构资源

点击获取更多架构资源

点击获取更多架构资源

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表