mirror of https://github.com/jeecgboot/JimuReport
示例代码更新
parent
9a1cd13699
commit
c58acb285b
File diff suppressed because one or more lines are too long
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,48 +6,42 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.3.5.RELEASE</version>
|
<version>2.3.5.RELEASE</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.example</groupId>
|
<groupId>org.jeecg</groupId>
|
||||||
<artifactId>jmrpt</artifactId>
|
<artifactId>jimureport-demo</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.1</version>
|
||||||
<name>jimureport-demo</name>
|
<name>jimureport-demo</name>
|
||||||
<description>jimureport-demo</description>
|
|
||||||
|
<url>http://www.jimureport.com</url>
|
||||||
|
<description>积木报表集成示例</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- jimureport -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jimureport</groupId>
|
||||||
|
<artifactId>spring-boot-starter-jimureport</artifactId>
|
||||||
|
<version>1.1.02-beta</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jimureport dependency -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.4.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- freemarker -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jimureport</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-jimureport</artifactId>
|
<artifactId>spring-boot-starter-freemarker</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>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- AutoPoi Excel-->
|
<!-- AutoPoi Excel-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -86,11 +80,26 @@
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.72</version>
|
<version>1.2.72</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- freemarker -->
|
|
||||||
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>spring-boot-starter-freemarker</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.1.17</version>
|
||||||
</dependency>
|
</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>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -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" +
|
||||||
|
"----------------------------------------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue