<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                快速集成 === [TOC] ## #JeecgBoot快速集成 - 第一步: 引入 jimureport 依賴 jar 添加Maven依賴包 ``` <dependency> <groupId>org.jeecgframework.jimureport</groupId> <artifactId>spring-boot-starter-jimureport</artifactId> <version>1.2.0</version> </dependency> ``` - 第二步: 執行數據庫腳本 Sql [jimureport.sql](https://github.com/zhangdaiscott/JimuReport/blob/master/db "jimureport.sql") - 第三步: 排除權限攔截 JimuReport自帶權限控制,所以需要放開對JimuReport請求的權限攔截。 JeecgBoot請修改類org.jeecg.config.shiro.ShiroConfig 加入以下代碼 (非JeecgBoot請按照自己權限規則排除) ``` //積木報表排除 filterChainDefinitionMap.put("/jmreport/**", "anon"); filterChainDefinitionMap.put("/**/*.js.map", "anon"); filterChainDefinitionMap.put("/**/*.css.map", "anon"); ``` - 第四步: 配置菜單 配置報表訪問菜單 ``` {{ window._CONFIG['domianURL'] }}/jmreport/list?token=${token} ``` 參數說明 - {{ window._CONFIG['domianURL'] }} :后臺項目訪問地址 - ${token} :登錄token用于權限控制 - 前端組件:layouts/IframePageView 菜單配置截圖 ![](https://img.kancloud.cn/2b/28/2b28f238e4433fa1059c98c2a6e776e0_665x910.png) - 第五步: 進入報表列表 ![](https://oscimg.oschina.net/oscnet/up-3d2ab4d3eaaa1c011220e64003372988e28.png) - 第六步: 自定義權限實現類(如果不自定義,則報表所有請求都不做權限控制) Jeecgboot請復制類 [JimuReportTokenService.java](https://github.com/zhangdaiscott/JimuReport/blob/master/config/JimuReportTokenService.java)到項目中即可(類路徑org.jeecg.config.jimureport),其他項目參考改造。 - 第七步: 檢查jar依賴版本 ~~~ fastjson版本低可能造成無法解析問題 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.75</version> </dependency> <!--引入commons-lang3--> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.10</version> </dependency> ~~~ ## #非JeecgBoot集成——額外步驟 > 前提: 采用SpringBoot+MybatisPlus的腳手架項目才支持與JimuReport集成。 - 第一步:啟動類添加掃碼路徑 `org.jeecg.modules.jmreport` ``` @MapperScan(value={"org.jeecg.modules.**.mapper*"}) @SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport"}) ``` - 第二步:application.yml 增加配置屬性 ``` spring: #靜態資源 resource: static-locations: classpath:/static/,classpath:/public/ #配置freemarker freemarker: # 設置模板后綴名 suffix: .ftl # 設置文檔類型 content-type: text/html # 設置頁面編碼格式 charset: UTF-8 # 設置頁面緩存 cache: false prefer-file-system-access: false # 設置ftl文件路徑 template-loader-path: - classpath:/templates #mybatis plus設置 mybatis-plus: mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml global-config: # 關閉MP3.0自帶的banner banner: false db-config: id-type: ASSIGN_ID # 默認數據庫表下劃線命名 table-underline: true configuration: # 返回類型為Map,顯示null對應的字段 call-setters-on-nulls: true #上傳文件存儲配置 jeecg : #local\minio\alioss uploadType: local path: upload:/opt/upload #阿里云oss oss: endpoint: oss-cn-beijing.aliyuncs.com accessKey: ?? secretKey: ?? bucketName: jeecgos staticDomain: ?? #minio文件 minio: minio_url: http://minio.jeecg.com minio_name: ?? minio_pass: ?? bucketName: otatest ``` - 第三步:配置jeecg私服,不然積木報表依賴下載不來 ``` <repositories> <repository> <id>jeecg</id> <name>jeecg Repository</name> <url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> ``` - 第四步:非jeecgboot項目集成可能缺少依賴,請參考下面配置加上 注意:版本號不一致也可能出沖突 ~~~ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.5.RELEASE</version> <relativePath/> </parent> ~~~ ``` <!--spring-boot --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- mybatis-plus --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.3.2</version> </dependency> <!-- freemarker --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency> <!-- 動態數據源 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.2.0</version> </dependency> <!-- minio oss--> <dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>8.0.3</version> </dependency> ``` ## 集成視頻 * [JeecgBoot2.1版本集成 JimuReport1.0.9實踐](https://www.bilibili.com/video/BV1Y541147m1?p=25) * [ 積木報表全套視頻 — JimuReport ](https://www.bilibili.com/video/BV1mK4y1H7NW) ## 附錄 1、如果是老版本升級比如【1.1.02-beta升級到1.1.04-beta.】 還需要手工執行下 `增量升級SQL` ``` ALTER TABLE `jimu_report_db` ADD COLUMN `is_list` int(3) NULL DEFAULT 0 COMMENT '是否是列表0否1是 默認0' AFTER `api_method` ; update jimu_report_db set is_list=1,is_page=1 where api_url like '%pageSize%' or is_page=1; ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看