🎉 2.8.0.RELEASE 新增在线报表模块
This commit is contained in:
parent
cdff774646
commit
3df176cf7d
15
blade-ops/blade-report/Dockerfile
Normal file
15
blade-ops/blade-report/Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
|
||||
MAINTAINER smallchill@163.com
|
||||
|
||||
RUN mkdir -p /blade/report
|
||||
|
||||
WORKDIR /blade/report
|
||||
|
||||
EXPOSE 8108
|
||||
|
||||
ADD ./target/blade-report.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
37
blade-ops/blade-report/pom.xml
Normal file
37
blade-ops/blade-report/pom.xml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?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">
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-report</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>${blade.project.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!--Blade-->
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-core-boot</artifactId>
|
||||
<version>${blade.tool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-core-report</artifactId>
|
||||
<version>${blade.tool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-common</artifactId>
|
||||
<version>${blade.project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springblade.report;
|
||||
|
||||
import org.springblade.core.launch.BladeApplication;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
|
||||
/**
|
||||
* UReport启动器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
public class ReportApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
BladeApplication.run(AppConstant.APPLICATION_REPORT_NAME, ReportApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springblade.report.config;
|
||||
|
||||
import org.springblade.core.report.datasource.ReportDataSource;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* 报表配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "report.enabled", havingValue = "true", matchIfMissing = true)
|
||||
public class BladeReportConfiguration {
|
||||
|
||||
/**
|
||||
* 自定义报表可选数据源
|
||||
*/
|
||||
@Bean
|
||||
public ReportDataSource reportDataSource(DataSource dataSource) {
|
||||
return new ReportDataSource(dataSource);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
10
blade-ops/blade-report/src/main/resources/application.yml
Normal file
10
blade-ops/blade-report/src/main/resources/application.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#服务器端口
|
||||
server:
|
||||
port: 8108
|
||||
|
||||
#报表配置
|
||||
report:
|
||||
enabled: true
|
||||
database:
|
||||
provider:
|
||||
prefix: blade-
|
||||
32
doc/sql/blade/blade-update-2.7.3~2.8.0.sql
Normal file
32
doc/sql/blade/blade-update-2.7.3~2.8.0.sql
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-- ----------------------------
|
||||
-- 报表文件表
|
||||
-- ----------------------------
|
||||
CREATE TABLE `blade_report_file` (
|
||||
`id` bigint(64) NOT NULL COMMENT '主键',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名',
|
||||
`content` mediumblob NULL COMMENT '文件内容',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT = '报表文件表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 插入报表文件表菜单数据
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||
VALUES ('1164733399669962301', '0', 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0);
|
||||
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||
VALUES ('1164733399669962302', '1164733399669962301', 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0);
|
||||
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||
VALUES ('1164733399669962303', '1164733399669962301', 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- 增加报表文件表菜单权限数据
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
|
||||
VALUES ('1161272893875228001', '1164733399669962301', '1123598816738675201');
|
||||
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
|
||||
VALUES ('1161272893875228002', '1164733399669962302', '1123598816738675201');
|
||||
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
|
||||
VALUES ('1161272893875228003', '1164733399669962303', '1123598816738675201');
|
||||
Loading…
Reference in New Issue
Block a user