From f1655d72309eaf006013f1f7579d973a7d4b5e86 Mon Sep 17 00:00:00 2001
From: "Yangkai.Shen" <237497819@qq.com>
Date: Mon, 26 Oct 2020 23:22:59 +0800
Subject: [PATCH] =?UTF-8?q?:construction:=20ureport2=20=E6=AD=A3=E5=9C=A8?=
=?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
demo-ureport2/README.md | 53 +++++++++
demo-ureport2/pom.xml | 106 +++++++++++-------
.../ureport2/config/InnerDatasource.java | 34 ++++++
.../src/main/resources/application.properties | 0
.../src/main/resources/application.yml | 16 +++
5 files changed, 168 insertions(+), 41 deletions(-)
create mode 100644 demo-ureport2/README.md
create mode 100644 demo-ureport2/src/main/java/com/xkcoding/ureport2/config/InnerDatasource.java
delete mode 100644 demo-ureport2/src/main/resources/application.properties
create mode 100644 demo-ureport2/src/main/resources/application.yml
diff --git a/demo-ureport2/README.md b/demo-ureport2/README.md
new file mode 100644
index 000000000..90a6619f6
--- /dev/null
+++ b/demo-ureport2/README.md
@@ -0,0 +1,53 @@
+UReport2 是一款基于架构在 Spring 之上纯 Java 的高性能报表引擎,通过迭代单元格可以实现任意复杂的中国式报表。 在 UReport2 中,提供了全新的基于网页的报表设计器,可以在 Chrome、Firefox、Edge 等各种主流浏览器运行(IE 浏览器除外)。使用 UReport2,打开浏览器即可完成各种复杂报表的设计制作
+
+[https://www.w3cschool.cn/ureport](https://www.w3cschool.cn/ureport)
+
+## 单机使用
+
+- 1. 引入 jar 依赖
+
+```xml
+
+
+ * 内部数据源 + *
+ * + * @author yangkai.shen + * @date Created in 2020-10-26 22:32 + */ +@Component +public class InnerDatasource implements BuildinDatasource { + @Autowired + private DataSource datasource; + + @Override + public String name() { + return "内部数据源"; + } + + @SneakyThrows + @Override + public Connection getConnection() { + return datasource.getConnection(); + } +} diff --git a/demo-ureport2/src/main/resources/application.properties b/demo-ureport2/src/main/resources/application.properties deleted file mode 100644 index e69de29bb..000000000 diff --git a/demo-ureport2/src/main/resources/application.yml b/demo-ureport2/src/main/resources/application.yml new file mode 100644 index 000000000..811024fdc --- /dev/null +++ b/demo-ureport2/src/main/resources/application.yml @@ -0,0 +1,16 @@ +server: + port: 8080 + servlet: + context-path: /demo +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8 + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver +ureport: + debug: false + disableFileProvider: false + disableHttpSessionReportCache: true + # 单机模式,路径需要提前创建 + fileStoreDir: '/Users/yangkai.shen/Desktop/ureport2'