[TOC] ## eladmin集成积木报表 ### 1、eladmin项目目录 ![](https://img.kancloud.cn/90/70/907086a5ab06e64b755ccbdeb5567e59_340x417.png) ### 2、执行初始化脚本`积木报表sql` [jimureport.sql](https://github.com/zhangdaiscott/JimuReport/blob/master/db "jimureport.sql") ### 3、pom中引入积木报表最新依赖及 ``` <!--积木报表依赖--> <dependency> <groupId>org.jeecgframework.jimureport</groupId> <artifactId>spring-boot-starter-jimureport</artifactId> <version>1.3.1-beta4</version> </dependency> ``` ![](https://img.kancloud.cn/48/fa/48fae74da7bdc63c2c6ea99a8f2bd93d_1683x943.png) ### 4、AppRun添加积木依赖扫描 ``` @SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport","me.zhengjie"}) ``` ![](https://img.kancloud.cn/e8/2d/e82dd76c055cc7b5d7dff7be415aa97b_1826x893.png) ### 5、SpringSecurityConfig权限控制放开静态文件和 1)需要把/jimureport请求放开 ``` .antMatchers("/jmreport/**").permitAll() ``` ![](https://img.kancloud.cn/b9/bd/b9bd1e6e3e660b19cbe3017fcc2ac700_1712x374.png) ![](https://img.kancloud.cn/e7/4c/e74c6239882739d7c994b4314a0cd600_1001x471.png) 2)需要直接能访问到static文件 ``` registry.addResourceHandler("/**").addResourceLocations("classpath:/static/").setCachePeriod(0); ``` ![](https://img.kancloud.cn/37/17/3717b2d86cbabcd0fbb2fdccc55eae22_1864x533.png) ### 6、dev.yml添加minidao配置 ``` minidao: base-package: org.jeecg.modules.jmreport.desreport.dao* # 数据库类型:mysql|postgresql|oracle|sqlserver db-type: mysql ``` ![](https://img.kancloud.cn/46/8e/468ea595bcd6e44701a2cc9d573d93e9_1443x730.png) ### 7、项目启动访问路径 eladmin默认端口8000 ``` http://localhost:8000/jmreport/list ``` ![](https://img.kancloud.cn/fc/a0/fca06974ca253cfd92f74c3486b6de39_1790x911.png) ### 8、常见问题 #### 1、需要做权限token传递 详见集成文档-》[积木报表token权限](http://report.jeecg.com/2208864) #### 2、需要上传图片 详见集成文档-》[文件上传配置](http://report.jeecg.com/2186109)