chore: 添加工作台模块
This commit is contained in:
parent
25c319b438
commit
2e5651c3ab
|
@ -0,0 +1 @@
|
|||
select database();
|
|
@ -0,0 +1,6 @@
|
|||
-- set innodb lock wait timeout
|
||||
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
|
@ -0,0 +1,6 @@
|
|||
-- set innodb lock wait timeout
|
||||
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
|
@ -0,0 +1 @@
|
|||
# dashboard
|
|
@ -0,0 +1 @@
|
|||
# dashboard
|
|
@ -0,0 +1 @@
|
|||
# dashboard
|
|
@ -0,0 +1,78 @@
|
|||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>services</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<artifactId>metersphere-dashboard</artifactId>
|
||||
<version>${revision}</version>
|
||||
<name>dashboard</name>
|
||||
<properties>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>metersphere-sdk</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>metersphere-provider</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>metersphere-system-setting</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>metersphere-system-setting</artifactId>
|
||||
<version>${revision}</version>
|
||||
<classifier>tests</classifier>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>metersphere-project-management</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mybatis.generator</groupId>
|
||||
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
||||
<version>1.3.7</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<overwrite>true</overwrite>
|
||||
<configurationFile>src/main/resources/dashboardGeneratorConfig.xml</configurationFile>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itfsw</groupId>
|
||||
<artifactId>mybatis-generator-plugin</artifactId>
|
||||
<version>1.3.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>mybatis-tools</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
package io.metersphere.dashboard;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
public class DashboardController {
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
|
||||
<generatorConfiguration>
|
||||
<!--配置数据库连接的位置-->
|
||||
<properties url="file:///opt/metersphere/conf/metersphere.properties"/>
|
||||
<!-- 设置mysql驱动路径 -->
|
||||
<!--<classPathEntry location="/Users/liuruibin/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar"/>-->
|
||||
<!-- 此处指定生成针对MyBatis3的DAO -->
|
||||
<context id="mysql" targetRuntime="MyBatis3" defaultModelType="flat">
|
||||
<!-- 字段带`,解决列表跟关键字冲突问题 -->
|
||||
<property name="autoDelimitKeywords" value="true"/>
|
||||
<property name="beginningDelimiter" value="`"/>
|
||||
<property name="endingDelimiter" value="`"/>
|
||||
|
||||
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
|
||||
<plugin type="org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin"/>
|
||||
<plugin type="io.metersphere.tools.mybatis.swagger.ImportSwagger3Plugin"/>
|
||||
<plugin type="io.metersphere.tools.mybatis.validation.ImportValidatorPlugin"/>
|
||||
<plugin type="com.itfsw.mybatis.generator.plugins.ModelColumnPlugin"/>
|
||||
<plugin type="com.itfsw.mybatis.generator.plugins.BatchInsertPlugin"/>
|
||||
|
||||
<!-- Lombok插件 -->
|
||||
<plugin type="com.itfsw.mybatis.generator.plugins.LombokPlugin">
|
||||
<!-- @Data 默认开启,同时插件会对子类自动附加@EqualsAndHashCode(callSuper = true),@ToString(callSuper = true) -->
|
||||
<property name="@Data" value="true"/>
|
||||
<!-- @Builder 必须在 Lombok 版本 >= 1.18.2 的情况下开启,对存在继承关系的类自动替换成@SuperBuilder -->
|
||||
<property name="@Builder" value="false"/>
|
||||
<!-- @NoArgsConstructor 和 @AllArgsConstructor 使用规则和Lombok一致 -->
|
||||
<property name="@AllArgsConstructor" value="false"/>
|
||||
<property name="@NoArgsConstructor" value="false"/>
|
||||
<!-- @Getter、@Setter、@Accessors 等使用规则参见官方文档 -->
|
||||
<property name="@Accessors(chain = true)" value="false"/>
|
||||
<!-- 临时解决IDEA工具对@SuperBuilder的不支持问题,开启后(默认未开启)插件在遇到@SuperBuilder注解时会调用ModelBuilderPlugin来生成相应的builder代码 -->
|
||||
<property name="supportSuperBuilderForIdea" value="false"/>
|
||||
</plugin>
|
||||
|
||||
|
||||
<!-- 用来除去时间信息的,这在配合类似subversion的代码管理工具时使用很有效,因为可以减少没有必要的注释迁入 -->
|
||||
<commentGenerator type="io.metersphere.tools.mybatis.validation.SchemaAnnotationGenerator">
|
||||
<property name="suppressDate" value="true"/>
|
||||
<!-- 关闭自动生成的注释 -->
|
||||
<property name="suppressAllComments" value="true"/>
|
||||
</commentGenerator>
|
||||
|
||||
|
||||
<!-- jdbc连接信息 --> <!-- EduLoanManage EduTestDataBase -->
|
||||
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
|
||||
connectionURL="${spring.datasource.url}&nullCatalogMeansCurrent=true"
|
||||
userId="${spring.datasource.username}"
|
||||
password="${spring.datasource.password}"/>
|
||||
|
||||
<!-- javaTypeResolver式类型转换的信息 -->
|
||||
<javaTypeResolver>
|
||||
<property name="forceBigDecimals" value="false"/>
|
||||
</javaTypeResolver>
|
||||
<!-- 模型对象 -->
|
||||
<javaModelGenerator targetPackage="io.metersphere.dashboard.domain" targetProject="../../framework/domain/src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
<property name="trimStrings" value="true"/>
|
||||
</javaModelGenerator>
|
||||
<!-- XML映射文件 -->
|
||||
<sqlMapGenerator targetPackage="io.metersphere.dashboard.mapper" targetProject="../../framework/domain/src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
</sqlMapGenerator>
|
||||
<!-- 接口 -->
|
||||
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.dashboard.mapper"
|
||||
targetProject="../../framework/domain/src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
</javaClientGenerator>
|
||||
|
||||
<!--要生成的数据库表 -->
|
||||
<table tableName="dashboard">
|
||||
<columnOverride column="tags" javaType="java.util.List<String>" jdbcType="VARCHAR" typeHandler="io.metersphere.handler.ListTypeHandler" />
|
||||
</table>
|
||||
|
||||
|
||||
</context>
|
||||
</generatorConfiguration>
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
|
||||
]
|
|
@ -0,0 +1,28 @@
|
|||
package io.metersphere.dashboard;
|
||||
|
||||
import io.metersphere.system.config.MinioProperties;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication(exclude = {
|
||||
QuartzAutoConfiguration.class,
|
||||
LdapAutoConfiguration.class,
|
||||
Neo4jAutoConfiguration.class
|
||||
})
|
||||
@EnableConfigurationProperties({
|
||||
MinioProperties.class
|
||||
})
|
||||
@ServletComponentScan
|
||||
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.system", "io.metersphere.dashboard"})
|
||||
public class DashboardApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DashboardApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
spring.application.name=metersphere
|
||||
management.server.port=9091
|
||||
server.port=8081
|
||||
# zip
|
||||
server.compression.enabled=true
|
||||
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css,text/javascript,image/jpeg
|
||||
server.compression.min-response-size=2048
|
||||
#
|
||||
quartz.enabled=true
|
||||
quartz.scheduler-name=msScheduler
|
||||
quartz.thread-count=10
|
||||
quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true
|
||||
#
|
||||
logging.file.path=/opt/metersphere/logs/metersphere
|
||||
# Hikari
|
||||
spring.datasource.url=jdbc:mysql://${embedded.mysql.host}:${embedded.mysql.port}/test?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&sessionVariables=sql_mode=%27STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION%27
|
||||
spring.datasource.username=${embedded.mysql.user}
|
||||
spring.datasource.password=${embedded.mysql.password}
|
||||
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||
spring.datasource.hikari.maximum-pool-size=100
|
||||
spring.datasource.hikari.minimum-idle=10
|
||||
spring.datasource.hikari.idle-timeout=300000
|
||||
spring.datasource.hikari.auto-commit=true
|
||||
spring.datasource.hikari.pool-name=DatebookHikariCP
|
||||
spring.datasource.hikari.max-lifetime=1800000
|
||||
spring.datasource.hikari.connection-timeout=30000
|
||||
spring.datasource.hikari.connection-test-query=SELECT 1
|
||||
# quartz datasource
|
||||
spring.datasource.quartz.url=${spring.datasource.url}
|
||||
spring.datasource.quartz.username=${spring.datasource.username}
|
||||
spring.datasource.quartz.password=${spring.datasource.password}
|
||||
spring.datasource.quartz.hikari.maximum-pool-size=50
|
||||
spring.datasource.quartz.hikari.minimum-idle=10
|
||||
spring.datasource.quartz.hikari.idle-timeout=300000
|
||||
spring.datasource.quartz.hikari.auto-commit=true
|
||||
spring.datasource.quartz.hikari.pool-name=DatebookHikariCP
|
||||
spring.datasource.quartz.hikari.max-lifetime=1800000
|
||||
spring.datasource.quartz.hikari.connection-timeout=30000
|
||||
spring.datasource.quartz.hikari.connection-test-query=SELECT 1
|
||||
# \u5355\u5143\u6D4B\u8BD5\u521D\u59CB\u5316\u6743\u9650 sql
|
||||
spring.sql.init.mode=always
|
||||
spring.sql.init.schema-locations=classpath*:dml/init_permission_test.sql
|
||||
|
||||
# spring.kafka
|
||||
spring.kafka.bootstrap-servers=${embedded.kafka.brokerList}
|
||||
spring.kafka.consumer.group-id=metersphere_group_id
|
||||
spring.kafka.listener.missing-topics-fatal=false
|
||||
spring.kafka.producer.properties.max.request.size=32428800
|
||||
spring.kafka.producer.batch-size=16384
|
||||
spring.kafka.consumer.properties.max.partition.fetch.bytes=52428800
|
||||
# mybatis
|
||||
mybatis.configuration.cache-enabled=true
|
||||
mybatis.configuration.lazy-loading-enabled=false
|
||||
mybatis.configuration.aggressive-lazy-loading=true
|
||||
mybatis.configuration.multiple-result-sets-enabled=true
|
||||
mybatis.configuration.use-column-label=true
|
||||
mybatis.configuration.auto-mapping-behavior=full
|
||||
mybatis.configuration.default-statement-timeout=25000
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
# virtual thread
|
||||
spring.threads.virtual.enabled=true
|
||||
# flyway enable
|
||||
spring.flyway.enabled=true
|
||||
spring.flyway.baseline-on-migrate=true
|
||||
spring.flyway.locations=classpath:/migration
|
||||
spring.flyway.table=metersphere_version
|
||||
spring.flyway.baseline-version=0
|
||||
spring.flyway.encoding=UTF-8
|
||||
spring.flyway.validate-on-migrate=false
|
||||
# jmeter
|
||||
jmeter.home=/opt/jmeter
|
||||
# file upload
|
||||
spring.servlet.multipart.max-file-size=500MB
|
||||
spring.servlet.multipart.max-request-size=500MB
|
||||
# i18n
|
||||
spring.messages.basename=i18n/commons,i18n/api,i18n/bug,i18n/case,i18n/plan,i18n/project,i18n/system,i18n/dashboard
|
||||
spring.messages.default-locale=zh_CN
|
||||
|
||||
# actuator
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.endpoints.enabled-by-default=false
|
||||
# redis
|
||||
spring.session.timeout=43200s
|
||||
spring.data.redis.host=${embedded.redis.host}
|
||||
spring.data.redis.password=${embedded.redis.password}
|
||||
spring.data.redis.port=${embedded.redis.port}
|
||||
spring.session.redis.repository-type=indexed
|
||||
#
|
||||
spring.freemarker.check-template-location=false
|
||||
spring.groovy.template.check-template-location=false
|
||||
#
|
||||
minio.endpoint=http://${embedded.minio.host}:${embedded.minio.port}
|
||||
minio.access-key=${embedded.minio.accessKey}
|
||||
minio.secret-key=${embedded.minio.secretKey}
|
||||
|
||||
logging.level.org.springframework.jdbc.core=info
|
||||
logging.level.io.metersphere.sdk.mapper=info
|
||||
logging.level.io.metersphere.project.mapper=info
|
||||
metersphere.file.batch-download-max=600MB
|
|
@ -0,0 +1,14 @@
|
|||
# embedded config
|
||||
embedded.containers.enabled=true
|
||||
embedded.containers.forceShutdown=true
|
||||
# mysql
|
||||
embedded.mysql.enabled=true
|
||||
embedded.mysql.encoding=utf8mb4
|
||||
embedded.mysql.collation=utf8mb4_general_ci
|
||||
embedded.mysql.dockerImage=mysql:8.0.35
|
||||
# redis
|
||||
embedded.redis.enabled=true
|
||||
# kafka
|
||||
embedded.kafka.enabled=true
|
||||
# minio
|
||||
embedded.minio.enabled=true
|
|
@ -20,6 +20,7 @@
|
|||
<module>project-management</module>
|
||||
<module>system-setting</module>
|
||||
<module>test-plan</module>
|
||||
<module>dashboard</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue