示例代码更新

dependabot/maven/jimureport-example/org.xerial-sqlite-jdbc-3.41.2.2
zhangdaiscott 2021-01-08 10:44:30 +08:00
parent 9a1cd13699
commit c58acb285b
10 changed files with 793 additions and 42 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
# jimureport-demo
积木报表集成示例代码。
```
集成示例采用mysql5.7数据库
```
使用步骤
-----------------------------------
- 第一步:创建数据库 jeecg-boot采用utf8mb4编码
- 第二步:执行初始化脚步
https://github.com/zhangdaiscott/JimuReport/blob/master/db/jimureport.mysql5_7.create.sql
- 第三步: 启动项目
右键执行com.example.jmrpt.JimuReportApplication
- 第四步: 访问项目
http://localhost:8085/jeecg-boot/jmreport/list

View File

@ -6,48 +6,42 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
<relativePath/>
</parent>
<groupId>com.example</groupId>
<artifactId>jmrpt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<groupId>org.jeecg</groupId>
<artifactId>jimureport-demo</artifactId>
<version>1.0.1</version>
<name>jimureport-demo</name>
<description>jimureport-demo</description>
<url>http://www.jimureport.com</url>
<description>积木报表集成示例</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- jimureport -->
<dependency>
<groupId>com.jimureport</groupId>
<artifactId>spring-boot-starter-jimureport</artifactId>
<version>1.1.02-beta</version>
</dependency>
<!-- jimureport dependency -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>
<!-- freemarker -->
<dependency>
<groupId>com.jimureport</groupId>
<artifactId>spring-boot-starter-jimureport</artifactId>
<version>1.1.01</version>
</dependency>
<!-- 动态数据源 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.17</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.2.0</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!-- AutoPoi Excel-->
<dependency>
@ -86,11 +80,26 @@
<artifactId>fastjson</artifactId>
<version>1.2.72</version>
</dependency>
<!-- freemarker -->
<!-- 动态数据源 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.17</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.2.0</version>
</dependency>
<!-- DB 驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- jimureport dependency -->
</dependencies>
<build>

View File

@ -0,0 +1,25 @@
package com.example.jmreport;
import org.jeecg.modules.jmreport.common.util.oConvertUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
@MapperScan(value={"org.jeecg.modules.**.mapper*"})
@SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport"})
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 JimuReport Demo is running! Access URL:\n\t" +
"Local: \t\thttp://localhost:" + port + path + "/jmreport/list\n\t" +
"----------------------------------------------------------");
}
}

View File

@ -1,15 +0,0 @@
package com.example.jmrpt;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@MapperScan(value={"org.jeecg.modules.**.mapper*"})
@SpringBootApplication(scanBasePackages = {"org.jeecg.modules.jmreport"})
public class JmrptApplication {
public static void main(String[] args) {
SpringApplication.run(JmrptApplication.class, args);
}
}