作者:翻斗大乐园


前言

积木报表是jeecg的一款开源但代码不开源的一款自定义报表,可以基于网页灵活调整报表的布局、样式等内容,无需编程,专为企业数据分析、报表制作而设计;降低管理人员汇总制作报表的门槛,解决各类日常管理和汇报的难题。但是因为代码不开源所以,很多公司商用时会因为积木报表logo、tilte、路由等陷入尴尬局面,本文基于SpringBoot实现整合积木报表,实现自有化报表项目集成。
   文章末尾附带源码。因为有代码展示,所以建议PC端打开浏览。


搭建SpringBoot项目

1:搭建springboot项目maven框架结构

⑴、idea中选择File-New-Project,选择Spring Initializr、选择对应的JDK版本、点击Next

SpringBoot 集成积木报表_Java

SpringBoot 集成积木报表_jar_02


⑵、输入项目名称,包名等 点击Next

SpringBoot 集成积木报表_Java_03


⑶、跳过选择默认依赖这一步,直接Next

SpringBoot 集成积木报表_jar_04

SpringBoot 集成积木报表_Java_05


⑷、选择项目存放路径,然后点击Finish 至此SpringBoot项目创建结束。

SpringBoot 集成积木报表_Java_06

SpringBoot 集成积木报表_jar_07

SpringBoot 集成积木报表_Java_08

SpringBoot 集成积木报表_Java_09




2. 配置Maven依赖 删除多余配置依赖,只保留项目配置依赖


SpringBoot 集成积木报表_spring_10

SpringBoot 集成积木报表_Java_11


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.alan.report</groupId>
    <artifactId>jimureportdemo</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>jimureportdemo</name>
    <description>jimureportdemo</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <java.version>1.8</java.version>
        <!-- DB驱动 -->
        <postgresql.version>42.2.6</postgresql.version>
        <ojdbc6.version>11.2.0.3</ojdbc6.version>
        <sqljdbc4.version>4.0</sqljdbc4.version>
        <mysql-connector-java.version>8.0.20</mysql-connector-java.version>
        <minio.version>8.0.3</minio.version>

        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <!-- JimuReport -->
        <dependency>
            <groupId>org.jeecgframework.jimureport</groupId>
            <artifactId>spring-boot-starter-jimureport</artifactId>
            <version>1.3.1-beta4</version>
        </dependency>

        <!-- SpringBoot-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
        </dependency>

        <!-- minio oss-->
        <dependency>
            <groupId>io.minio</groupId>
            <artifactId>minio</artifactId>
            <version>${minio.version}</version>
            <optional>true</optional>
        </dependency>

        <!-- 数据库驱动 -->
        <!--mysql-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql-connector-java.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!--Spring-Data-JPA依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
            </plugin>
        </plugins>
    </build>

</project>


3. 配置yml文件


SpringBoot 集成积木报表_jar_12


server:
  port: 15081
spring:
  #配置静态资源
  mvc:
    static-path-pattern: /**
  resource:
    static-locations: classpath:/static/
  #数据库连接
  datasource:
    username: root
    password: 123456
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${MYSQL-HOST:127.0.0.1}:${MYSQL-PORT:3306}/${MYSQL-DB:custom_report}?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
#JimuReport[minidao配置]
minidao :
  base-package: org.jeecg.modules.jmreport.desreport.dao*
  db-type: mysql
#JimuReport[上传配置]
jeecg :
  # local|minio|alioss
  uploadType: local
  # local
  path :
    #文件路径
    upload: /opt/upload
  # alioss
  oss:
    endpoint: oss-cn-beijing.aliyuncs.com
    accessKey: ??
    secretKey: ??
    staticDomain: ??
    bucketName: ??
  # minio
  minio:
    minio_url: http://minio.jeecg.com
    minio_name: ??
    minio_pass: ??
    bucketName: ??
#输出sql日志
logging:
  level:
    org.jeecg.modules.jmreport : debug


4. 启动类添加扫包注解


SpringBoot 集成积木报表_Java_13


package com.alan.report;
/***
 *@title JimuReportDemoApplication
 *@description
 *@author Administrator
 *@version 1.0.0
 *@create 2025-05-03 上午 10:21
 **/
import org.jeecg.modules.jmreport.common.util.oConvertUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * @ClassName: JimuReportDemoApplication
 * @Description: 自定义报表启动类
 * @Author: Alan_liu
 * @Date: 2025-05-03 10:21
 * @Version: 1.0
 **/
@SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport", "com.alan.report"})
public class JimuReportDemoApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext application = SpringApplication.run(JimuReportDemoApplication.class, args);
        Environment env = application.getEnvironment();
        String port = env.getProperty("server.port");
        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
        System.out.print("\n----------------------------------------------------------\n\t" +
                "Application CustomizeReport is running! Access URL:\n\t" +
                "Local: \t\thttp://localhost:" + port + path + "/jmreport/list\n\t" +
                "----------------------------------------------------------");
    }
}



5. 启动项目 访问打印的链接,即可访问报表设计页面


SpringBoot 集成积木报表_Java_14

D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -javaagent:H:\SoftWare\Idea202103\lib\idea_rt.jar=56893:H:\SoftWare\Idea202103\bin -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\charsets.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\deploy.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\access-bridge-64.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\cldrdata.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\dnsns.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\jaccess.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\jfxrt.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\localedata.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\nashorn.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\sunec.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\sunjce_provider.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\sunmscapi.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\sunpkcs11.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\ext\zipfs.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\javaws.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\jce.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\jfr.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\jfxswt.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\jsse.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\management-agent.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\plugin.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\resources.jar;D:\SoftWare\Develop_SoftWare\Java\jdk-1.8\jre\lib\rt.jar;H:\SoftCodes\customizeJimuReport\jimureport\target\classes;E:\Decument\Maven\repository\org\jeecgframework\jimureport\spring-boot-starter-jimureport\1.3.1-beta4\spring-boot-starter-jimureport-1.3.1-beta4.jar;E:\Decument\Maven\repository\org\jeecgframework\minidao-spring-boot-starter\1.7.3\minidao-spring-boot-starter-1.7.3.jar;E:\Decument\Maven\repository\org\jeecgframework\minidao-pe\1.7.3\minidao-pe-1.7.3.jar;E:\Decument\Maven\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;E:\Decument\Maven\repository\org\apache\commons\commons-lang3\3.11\commons-lang3-3.11.jar;E:\Decument\Maven\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;E:\Decument\Maven\repository\org\aspectj\aspectjrt\1.9.6\aspectjrt-1.9.6.jar;E:\Decument\Maven\repository\opensymphony\ognl\2.6.11\ognl-2.6.11.jar;E:\Decument\Maven\repository\com\github\jsqlparser\jsqlparser\3.2\jsqlparser-3.2.jar;E:\Decument\Maven\repository\com\alibaba\fastjson\1.2.75\fastjson-1.2.75.jar;E:\Decument\Maven\repository\org\jeecgframework\autopoi-web\1.3\autopoi-web-1.3.jar;E:\Decument\Maven\repository\org\jeecgframework\autopoi\1.3\autopoi-1.3.jar;E:\Decument\Maven\repository\org\apache\poi\poi\4.1.2\poi-4.1.2.jar;E:\Decument\Maven\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;E:\Decument\Maven\repository\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;E:\Decument\Maven\repository\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;E:\Decument\Maven\repository\org\apache\poi\poi-ooxml\4.1.2\poi-ooxml-4.1.2.jar;E:\Decument\Maven\repository\org\apache\commons\commons-compress\1.19\commons-compress-1.19.jar;E:\Decument\Maven\repository\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;E:\Decument\Maven\repository\org\apache\poi\poi-ooxml-schemas\4.1.2\poi-ooxml-schemas-4.1.2.jar;E:\Decument\Maven\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;E:\Decument\Maven\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;E:\Decument\Maven\repository\org\apache\poi\poi-scratchpad\4.1.2\poi-scratchpad-4.1.2.jar;E:\Decument\Maven\repository\org\apache\poi\ooxml-schemas\1.4\ooxml-schemas-1.4.jar;E:\Decument\Maven\repository\org\apache\xmlbeans\xmlbeans\3.0.1\xmlbeans-3.0.1.jar;E:\Decument\Maven\repository\com\google\zxing\core\3.3.1\core-3.3.1.jar;E:\Decument\Maven\repository\cn\hutool\hutool-crypto\5.3.8\hutool-crypto-5.3.8.jar;E:\Decument\Maven\repository\cn\hutool\hutool-core\5.3.8\hutool-core-5.3.8.jar;E:\Decument\Maven\repository\com\alibaba\druid\1.1.22\druid-1.1.22.jar;E:\Decument\Maven\repository\com\aliyun\oss\aliyun-sdk-oss\3.11.2\aliyun-sdk-oss-3.11.2.jar;E:\Decument\Maven\repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;E:\Decument\Maven\repository\org\apache\httpcomponents\httpcore\4.4.14\httpcore-4.4.14.jar;E:\Decument\Maven\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;E:\Decument\Maven\repository\org\jdom\jdom2\2.0.6\jdom2-2.0.6.jar;E:\Decument\Maven\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;E:\Decument\Maven\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;E:\Decument\Maven\repository\com\aliyun\aliyun-java-sdk-core\4.5.10\aliyun-java-sdk-core-4.5.10.jar;E:\Decument\Maven\repository\com\google\code\gson\gson\2.8.6\gson-2.8.6.jar;E:\Decument\Maven\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;E:\Decument\Maven\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;E:\Decument\Maven\repository\org\jacoco\org.jacoco.agent\0.8.5\org.jacoco.agent-0.8.5-runtime.jar;E:\Decument\Maven\repository\org\ini4j\ini4j\0.5.4\ini4j-0.5.4.jar;E:\Decument\Maven\repository\io\opentracing\opentracing-api\0.33.0\opentracing-api-0.33.0.jar;E:\Decument\Maven\repository\io\opentracing\opentracing-util\0.33.0\opentracing-util-0.33.0.jar;E:\Decument\Maven\repository\io\opentracing\opentracing-noop\0.33.0\opentracing-noop-0.33.0.jar;E:\Decument\Maven\repository\com\aliyun\aliyun-java-sdk-ram\3.1.0\aliyun-java-sdk-ram-3.1.0.jar;E:\Decument\Maven\repository\com\aliyun\aliyun-java-sdk-kms\2.11.0\aliyun-java-sdk-kms-2.11.0.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-web\2.4.5\spring-boot-starter-web-2.4.5.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter\2.4.5\spring-boot-starter-2.4.5.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot\2.4.5\spring-boot-2.4.5.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-autoconfigure\2.4.5\spring-boot-autoconfigure-2.4.5.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-logging\2.4.5\spring-boot-starter-logging-2.4.5.jar;E:\Decument\Maven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\Decument\Maven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\Decument\Maven\repository\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;E:\Decument\Maven\repository\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;E:\Decument\Maven\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;E:\Decument\Maven\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;E:\Decument\Maven\repository\org\springframework\spring-core\5.3.6\spring-core-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-jcl\5.3.6\spring-jcl-5.3.6.jar;E:\Decument\Maven\repository\org\yaml\snakeyaml\1.27\snakeyaml-1.27.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-json\2.4.5\spring-boot-starter-json-2.4.5.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.4\jackson-datatype-jdk8-2.11.4.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.4\jackson-datatype-jsr310-2.11.4.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.4\jackson-module-parameter-names-2.11.4.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-tomcat\2.4.5\spring-boot-starter-tomcat-2.4.5.jar;E:\Decument\Maven\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.45\tomcat-embed-core-9.0.45.jar;E:\Decument\Maven\repository\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;E:\Decument\Maven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.45\tomcat-embed-websocket-9.0.45.jar;E:\Decument\Maven\repository\org\springframework\spring-web\5.3.6\spring-web-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-beans\5.3.6\spring-beans-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-webmvc\5.3.6\spring-webmvc-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-aop\5.3.6\spring-aop-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-context\5.3.6\spring-context-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-expression\5.3.6\spring-expression-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-freemarker\2.4.5\spring-boot-starter-freemarker-2.4.5.jar;E:\Decument\Maven\repository\org\freemarker\freemarker\2.3.31\freemarker-2.3.31.jar;E:\Decument\Maven\repository\org\springframework\spring-context-support\5.3.6\spring-context-support-5.3.6.jar;E:\Decument\Maven\repository\io\minio\minio\8.0.3\minio-8.0.3.jar;E:\Decument\Maven\repository\com\carrotsearch\thirdparty\simple-xml-safe\2.7.1\simple-xml-safe-2.7.1.jar;E:\Decument\Maven\repository\com\google\guava\guava\29.0-jre\guava-29.0-jre.jar;E:\Decument\Maven\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;E:\Decument\Maven\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;E:\Decument\Maven\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;E:\Decument\Maven\repository\org\checkerframework\checker-qual\2.11.1\checker-qual-2.11.1.jar;E:\Decument\Maven\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;E:\Decument\Maven\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;E:\Decument\Maven\repository\com\squareup\okhttp3\okhttp\3.14.9\okhttp-3.14.9.jar;E:\Decument\Maven\repository\com\squareup\okio\okio\1.17.2\okio-1.17.2.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\core\jackson-annotations\2.11.4\jackson-annotations-2.11.4.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\core\jackson-core\2.11.4\jackson-core-2.11.4.jar;E:\Decument\Maven\repository\com\fasterxml\jackson\core\jackson-databind\2.11.4\jackson-databind-2.11.4.jar;E:\Decument\Maven\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.4.5\spring-boot-starter-data-jpa-2.4.5.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-aop\2.4.5\spring-boot-starter-aop-2.4.5.jar;E:\Decument\Maven\repository\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;E:\Decument\Maven\repository\org\springframework\boot\spring-boot-starter-jdbc\2.4.5\spring-boot-starter-jdbc-2.4.5.jar;E:\Decument\Maven\repository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;E:\Decument\Maven\repository\org\springframework\spring-jdbc\5.3.6\spring-jdbc-5.3.6.jar;E:\Decument\Maven\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;E:\Decument\Maven\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;E:\Decument\Maven\repository\org\hibernate\hibernate-core\5.4.30.Final\hibernate-core-5.4.30.Final.jar;E:\Decument\Maven\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;E:\Decument\Maven\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;E:\Decument\Maven\repository\net\bytebuddy\byte-buddy\1.10.22\byte-buddy-1.10.22.jar;E:\Decument\Maven\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;E:\Decument\Maven\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;E:\Decument\Maven\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;E:\Decument\Maven\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;E:\Decument\Maven\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;E:\Decument\Maven\repository\org\glassfish\jaxb\jaxb-runtime\2.3.4\jaxb-runtime-2.3.4.jar;E:\Decument\Maven\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;E:\Decument\Maven\repository\org\glassfish\jaxb\txw2\2.3.4\txw2-2.3.4.jar;E:\Decument\Maven\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;E:\Decument\Maven\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;E:\Decument\Maven\repository\org\springframework\data\spring-data-jpa\2.4.8\spring-data-jpa-2.4.8.jar;E:\Decument\Maven\repository\org\springframework\data\spring-data-commons\2.4.8\spring-data-commons-2.4.8.jar;E:\Decument\Maven\repository\org\springframework\spring-orm\5.3.6\spring-orm-5.3.6.jar;E:\Decument\Maven\repository\org\springframework\spring-tx\5.3.6\spring-tx-5.3.6.jar;E:\Decument\Maven\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;E:\Decument\Maven\repository\org\springframework\spring-aspects\5.3.6\spring-aspects-5.3.6.jar com.alan.report.JimuReportDemoApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.5)

2025-05-03 10:26:51.473  INFO 16252 --- [           main] c.alan.report.JimuReportDemoApplication  : Starting JimuReportDemoApplication using Java 1.8.0_371 on DESKTOP-5THTIBR with PID 16252 (H:\SoftCodes\customizeJimuReport\jimureport\target\classes started by Administrator in H:\SoftCodes\customizeJimuReport\jimureport)
2025-05-03 10:26:51.513  INFO 16252 --- [           main] c.alan.report.JimuReportDemoApplication  : No active profile set, falling back to default profiles: default
2025-05-03 10:26:56.751  INFO 16252 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2025-05-03 10:26:56.798  INFO 16252 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 17 ms. Found 0 JPA repository interfaces.
2025-05-03 10:26:57.245  INFO 16252 --- [           main] o.j.m.auto.MinidaoAutoConfiguration      :  ******************* init miniDao config [ begin ] ***********************
2025-05-03 10:26:57.246  INFO 16252 --- [           main] o.j.m.auto.MinidaoAutoConfiguration      :  ------ minidao.base-package ------- org.jeecg.modules.jmreport.desreport.dao*
2025-05-03 10:26:57.247  INFO 16252 --- [           main] o.j.m.auto.MinidaoAutoConfiguration      :  ------ minidao.db-type ------------ mysql
2025-05-03 10:26:57.255  INFO 16252 --- [           main] o.j.m.auto.MinidaoAutoConfiguration      :  *******************  init miniDao config  [ end ] ***********************
2025-05-03 10:26:57.291  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDao }
2025-05-03 10:26:57.293  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDataSourceDao }
2025-05-03 10:26:57.293  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDbDao }
2025-05-03 10:26:57.293  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDbFieldDao }
2025-05-03 10:26:57.293  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDbParamDao }
2025-05-03 10:26:57.293  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDictDao }
2025-05-03 10:26:57.294  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportDictItemDao }
2025-05-03 10:26:57.294  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportLinkDao }
2025-05-03 10:26:57.294  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportMapDao }
2025-05-03 10:26:57.294  INFO 16252 --- [           main] o.j.m.f.MiniDaoClassPathMapperScanner    : register minidao name is { org.jeecg.modules.jmreport.desreport.dao.JimuReportShareDao }
2025-05-03 10:26:57.950  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.JdbcTemplateConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.JdbcTemplateConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:57.970  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.082  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.342  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [com.zaxxer.hikari.HikariDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.352  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.jdbc-org.springframework.boot.autoconfigure.jdbc.JdbcProperties' of type [org.springframework.boot.autoconfigure.jdbc.JdbcProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.411  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jdbcTemplate' of type [org.springframework.jdbc.core.JdbcTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.417  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.NamedParameterJdbcTemplateConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.NamedParameterJdbcTemplateConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.430  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'namedParameterJdbcTemplate' of type [org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.440  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#9' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.461  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportShareDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.464  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#8' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.468  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportMapDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.473  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#7' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.477  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportLinkDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.480  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#6' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.482  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDictItemDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.489  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#5' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.491  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDictDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.496  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#4' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.499  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDbParamDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.502  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#3' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.504  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDbFieldDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.506  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#2' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.508  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDbDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.511  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589#1' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.513  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDataSourceDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.517  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean '(inner bean)#5183d589' of type [org.jeecgframework.minidao.aop.MiniDaoHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:58.521  INFO 16252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'jimuReportDao' of type [org.jeecgframework.minidao.factory.MiniDaoBeanFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2025-05-03 10:26:59.731  INFO 16252 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 15081 (http)
2025-05-03 10:26:59.768  INFO 16252 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2025-05-03 10:26:59.769  INFO 16252 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.45]
2025-05-03 10:27:00.240  INFO 16252 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2025-05-03 10:27:00.240  INFO 16252 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8375 ms
2025-05-03 10:27:01.496  INFO 16252 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2025-05-03 10:27:07.750  INFO 16252 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2025-05-03 10:27:07.920  INFO 16252 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2025-05-03 10:27:08.159  INFO 16252 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.30.Final
2025-05-03 10:27:08.957  INFO 16252 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2025-05-03 10:27:09.451  INFO 16252 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2025-05-03 10:27:10.505  INFO 16252 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2025-05-03 10:27:10.589  INFO 16252 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2025-05-03 10:27:10.651  INFO 16252 --- [           main] o.j.m.j.config.JimuReportConfiguration   :  --- Init JimuReport Config ---
2025-05-03 10:27:11.856  WARN 16252 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2025-05-03 10:27:12.693  INFO 16252 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2025-05-03 10:27:14.776  INFO 16252 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 15081 (http) with context path ''
2025-05-03 10:27:14.881  INFO 16252 --- [           main] c.alan.report.JimuReportDemoApplication  : Started JimuReportDemoApplication in 26.34 seconds (JVM running for 34.259)

----------------------------------------------------------
	Application CustomizeReport is running! Access URL:
	Local: 		http://localhost:15081/jmreport/list
	----------------------------------------------------------


SpringBoot 集成积木报表_Java_15


6. 报表设计器自定义修改

打开本地Maven仓库 ,找到 org\jeecgframework\jimureport\spring-boot-starter-jimureport\1.3.1-beta4 积木jar包,打开templates目录下jmreport目录下desreport,编辑demo、index、list 三个ftl文件(右键内部编辑器打开)

SpringBoot 集成积木报表_spring_16

替换原积木title为需要的title名称(例如:XXX报表设计器)

SpringBoot 集成积木报表_spring_17

SpringBoot 集成积木报表_jar_18

SpringBoot 集成积木报表_Java_19

更新文件:

SpringBoot 集成积木报表_Java_20


重启应用:

SpringBoot 集成积木报表_jar_21


刷新界面:


SpringBoot 集成积木报表_jar_22


SpringBoot 集成积木报表_spring_23



tile的logo与报表icon资源在 static目录下jmreport目录下desreport_目录下的corelib目录中
jiade.jpg 是报表icon、logo.png为title的logo
有需求可以自己替换

SpringBoot 集成积木报表_spring_24


打开static目录下jmreport目录下desreport_目录下js目录下core目录

SpringBoot 集成积木报表_spring_25


打开api.js

SpringBoot 集成积木报表_Java_26



将对应的jmreport改为你需要展示的路由名称(例如:report)

SpringBoot 集成积木报表_jar_27


7. nginx配置代理


server {


# 需要被监听的端口号,前提是此端口号没有被占用
  # 否则在重启 Nginx 时会报错


  listen       8080;
  # 服务名称,无所谓
  server_name  report;
  #监听report请求
  location /report {
    # 后端的真实接口
    proxy_pass http://ip:port/jmreport;
    #proxy_redirect off;
    proxy_set_header Host $proxy_host;


    #proxy_set_header
    #X-Real-IP $remote_addr;
    #proxy_set_header
    #X-Forwarded-For
    #$proxy_add_x_forwarded_for;
    #proxy_set_header
    #Cookie $http_cookie;




    #proxy_set_header
    #X-Forwarded-For
    #$proxy_add_x_forwarded_for;

    #proxy_set_header   Cookie $http_cookie;
  }
  #给静态资源(js、css等)请求配置实际路由
  location /jmreport {
    proxy_pass http://ip:port/jmreport;
    #proxy_redirect off;
    proxy_set_header Host $proxy_host;


    #proxy_set_header
    #X-Real-IP $remote_addr;
    #proxy_set_header

    #X-Forwarded-For
    #$proxy_add_x_forwarded_for;
    #proxy_set_header
    #Cookie $http_cookie;


    #proxy_set_header
    #X-Forwarded-For
    #$proxy_add_x_forwarded_for;

    #proxy_set_header
    #Cookie $http_cookie;

  }
}

访问nginx配置的端口与路由,即可自动转发自定义报表内容



JimuReport积木报表(免费报表工具)


官方访问地址:https://github.com/jeecgboot/jimureport

官方示例代码下载 地址:https://github.com/jeecgboot/jimureport.git


积木报表JimuReport,是一款免费的数据可视化报表,含报表、仪表盘和大屏设计,像搭建积木一样完全在线设计!功能涵盖:数据报表、打印设计、图表报表、门户设计、大屏设计等!

  • Web版报表设计器,类Excel操作风格,通过拖拽完成报表设计,所见即所得.
  • 大屏采用类word风格,可以随意拖动组件,想怎么设计怎么设计,可以像百度和阿里一样,设计出炫酷大屏!
  • 从 v1.9+ 起推出 JimuBI 产品,她的牛叉之处,同时支持仪表盘、大屏、门户 (支持交互)、移动.
  • 秉承"简单、易用、专业"的产品理念,极大的降低报表开发难度、缩短开发周期、节省成本.
  • 领先的企业级Web报表,支持各种复杂报表,专注于解决企业报表难题.
  • 积木BI 数据可视化,支持大屏设计和仪表盘,致力于更生动、更友好的形式呈现实时业务数据分析


技术文档





为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
态度:道阻且长,行则将至;行而不辍,未来可期
.....................................................................
------- 桃之夭夭,灼灼其华。之子于归,宜其室家。 ---------------
------- 桃之夭夭,有蕡其实。之子于归,宜其家室。 ---------------
------- 桃之夭夭,其叶蓁蓁。之子于归,宜其家人。 ---------------
=====================================================================