Springboot集成积⽊报表(jimuReport)Springboot 集成积⽊报表(jimuReport)
搭建maven项⽬
引⼊积⽊报表所需pom依赖(jimureport所需的,mybatis-plus所需3以上)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.6.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- mvnrepository/artifact/org.springframework.boot/spring-boot-starter-freemarker -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!--<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<!–<version>3.0-gamma</version>–>
<version>2.3.1</version>
</dependency>-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.2.1</version>
</dependency>
<!-- mvnrepository/artifact/com.alibaba/druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.10</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- mvnrepository/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<!-- mvnrepository/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<!-- mvnrepository/artifact/cn.hutool/hutool-core -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.5.2</version>
</dependency>
<!-- mvnrepository/artifact/org.apachemons/commons-lang3 -->
<dependency>
<groupId>org.apachemons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<!-- mvnrepository/artifact/commons-collections/commons-collections --> <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
</dependencies>
引⼊ jimureport 依赖包
jar依赖
<dependency>
<groupId>com.jimureport</groupId>
<artifactId>spring-boot-starter-jimureport</artifactId>
<version>1.1-beta</version>
</dependency>
同时需要配置jeecg私服地址
<repository>
<id>aliyun</id>
<name>aliyun Repository</name>
<url>maven.aliyun/nexus/content/groups/public</url> <snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
springboot aop<id>jeecg</id>
<name>jeecg Repository</name>
<url>/nexus/content/repositories/jeecg</url> <snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
增加SpringBoot配置属性
jeecg :
# 本地:local\Minio:minio\阿⾥云:alioss
uploadType: local
path :
#⽂件上传根⽬录设置
upload:/Desktop/report
#webapp⽂件路径
webapp: D://opt//webapp
shiro:
excludeUrls:/test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**  #阿⾥云oss存储配置
oss:
endpoint: oss-cn-beijing.aliyuncs
accessKey: ??
secretKey: ??
bucketName: jeecgos
staticDomain: ??
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 表单设计器配置
desform:
# 主题颜⾊(仅⽀持 16进制颜⾊代码)
theme-color: "#1890ff"
# ⽂件、图⽚上传⽅式,可选项:qiniu(七⽜云)、system(跟随系统配置)
upload-type: system
# 在线预览⽂件服务器地址配置
file-view-domain: 127.0.0.1:8012
# minio⽂件上传
minio:
minio_url: minio.jeecg
minio_name: ??
minio_pass: ??
bucketName: otatest
#⼤屏报表参数设置
jmreport:
mode: dev
#是否需要校验token
is_verify_token: false
#必须校验⽅法
verify_methods: remove,delete,save,add,update
#Wps在线⽂档
wps:
domain: wwo.wps/office/
appid: ??
appsecret: ??
#xxl-job配置
xxljob:
enabled: false
adminAddresses: 127.0.0.1:9080/xxl-job-admin
appname: ${spring.application.name}
accessToken: ''
address: 127.0.0.1:30007
ip: 127.0.0.1
port: 30007
logPath: logs/jeecg/job/jobhandler/
logRetentionDays: 30
#⾃定义路由配置 yml nacos database
route:
config:
data-id: jeecg-gateway-router
group: DEFAULT_GROUP
data-type: yml
#分布式锁配置
redisson:
address: 127.0.0.1:6379
password:
type: STANDALONE
enabled: true
配置数据库相关配置
spring:
datasource:
dynamic:
primary: master
strict:false
datasource:
master:
driver-class-name: sql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/jeecg-boot?useUnicode=true&characterEncoding=utf8
username: root
password:密码
type: com.alibaba.druid.pool.DruidDataSource
mybatis-plus:
mapper-locations: classpath:org/jeecg/modules/jmreport/desreport/mapper/xml/*l
#实体扫描,多个package⽤逗号或者分号分隔
typeAliasesPackage: ity
#typeEnumsPackage: cn.ums
global-config:
#主键类型  AUTO:"数据库ID⾃增", INPUT:"⽤户输⼊ID",ID_WORKER:"全局唯⼀ID (数字类型唯⼀ID)", UUID:"全局唯⼀ID UUID";    id-type: 3
#字段策略 IGNORED:"忽略判断",NOT_NULL:"⾮ NULL 判断"),NOT_EMPTY:"⾮空判断"
field-strategy: 2
#驼峰下划线转换
db-column-underline: true
#数据库⼤写下划线转换
#capital-mode: true
#逻辑删除配置
#mybatis-plus.global-config.sql-injector=batisplus.mapper.LogicSqlInjector
#sql-injector: batisplus.mapper.LogicSqlInjector #最好使⽤⾃定义bean注⼊
logic-delete-value: 0
logic-not-delete-value: 1
#刷新mapper 调试神器
refresh-mapper: true
# 原⽣配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql语句,调试⽤
启动类添加扫描包
@MapperScan(basePackages ={"dules.jmreport.desreport.mapper"})
@SpringBootApplication(scanBasePackages ={"dules.jmreport"})
执⾏sql脚本
执⾏相关脚本,具体见官⽹相关
执⾏结果

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。