diff --git a/api-test/backend/src/main/java/io/metersphere/ApiApplication.java b/api-test/backend/src/main/java/io/metersphere/ApiApplication.java index a090587994..d13796449d 100644 --- a/api-test/backend/src/main/java/io/metersphere/ApiApplication.java +++ b/api-test/backend/src/main/java/io/metersphere/ApiApplication.java @@ -5,6 +5,7 @@ import io.metersphere.config.KafkaProperties; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -13,6 +14,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/CommonsDatabaseConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/CommonsDatabaseConfig.java index 626e1e2b5c..868cca8631 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/CommonsDatabaseConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/CommonsDatabaseConfig.java @@ -63,7 +63,6 @@ public class CommonsDatabaseConfig { @Bean @Primary @ConfigurationProperties(prefix = "spring.datasource.hikari") - @ConditionalOnMissingBean public DataSource dataSource(DataSourceProperties properties) { return DataSourceBuilder.create(properties.getClassLoader()).type(HikariDataSource.class) .driverClassName(properties.determineDriverClassName()) @@ -76,7 +75,6 @@ public class CommonsDatabaseConfig { @Bean @ConfigurationProperties(prefix = "spring.datasource.quartz.hikari") @QuartzDataSource - @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "quartz", value = "enabled", havingValue = "true") public DataSource quartzDataSource(DataSourceProperties properties) { return DataSourceBuilder.create(properties.getClassLoader()).type(HikariDataSource.class) diff --git a/framework/sdk-parent/sdk/src/main/resources/commons.properties b/framework/sdk-parent/sdk/src/main/resources/commons.properties index 50c24517fc..a8b7981858 100644 --- a/framework/sdk-parent/sdk/src/main/resources/commons.properties +++ b/framework/sdk-parent/sdk/src/main/resources/commons.properties @@ -1,8 +1,9 @@ # Hikari spring.datasource.type=com.zaxxer.hikari.HikariDataSource -spring.datasource.hikari.maximum-pool-size=10 +spring.datasource.hikari.maximum-pool-size=20 +spring.datasource.hikari.minimum-idle=10 +spring.datasource.hikari.idle-timeout=600000 spring.datasource.hikari.auto-commit=true -spring.datasource.hikari.idle-timeout=10000 spring.datasource.hikari.pool-name=DatebookHikariCP spring.datasource.hikari.max-lifetime=1800000 spring.datasource.hikari.connection-timeout=30000 @@ -11,9 +12,10 @@ spring.datasource.hikari.connection-test-query=SELECT 1 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=10 +spring.datasource.quartz.hikari.maximum-pool-size=20 +spring.datasource.quartz.hikari.minimum-idle=10 +spring.datasource.quartz.hikari.idle-timeout=600000 spring.datasource.quartz.hikari.auto-commit=true -spring.datasource.quartz.hikari.idle-timeout=10000 spring.datasource.quartz.hikari.pool-name=DatebookHikariCP spring.datasource.quartz.hikari.max-lifetime=1800000 spring.datasource.quartz.hikari.connection-timeout=30000 diff --git a/performance-test/backend/src/main/java/io/metersphere/PerformanceApplication.java b/performance-test/backend/src/main/java/io/metersphere/PerformanceApplication.java index fc0ad9b51c..a6a58fe075 100644 --- a/performance-test/backend/src/main/java/io/metersphere/PerformanceApplication.java +++ b/performance-test/backend/src/main/java/io/metersphere/PerformanceApplication.java @@ -5,6 +5,7 @@ import io.metersphere.config.KafkaProperties; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -13,6 +14,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/project-management/backend/src/main/java/io/metersphere/ProjectApplication.java b/project-management/backend/src/main/java/io/metersphere/ProjectApplication.java index 43224a4bd8..3f19595f29 100644 --- a/project-management/backend/src/main/java/io/metersphere/ProjectApplication.java +++ b/project-management/backend/src/main/java/io/metersphere/ProjectApplication.java @@ -3,6 +3,7 @@ package io.metersphere; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -11,6 +12,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/report-stat/backend/src/main/java/io/metersphere/ReportApplication.java b/report-stat/backend/src/main/java/io/metersphere/ReportApplication.java index b83bf6814e..2e1ca04e4f 100644 --- a/report-stat/backend/src/main/java/io/metersphere/ReportApplication.java +++ b/report-stat/backend/src/main/java/io/metersphere/ReportApplication.java @@ -5,6 +5,7 @@ import io.metersphere.config.KafkaProperties; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -13,6 +14,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/system-setting/backend/src/main/java/io/metersphere/SettingApplication.java b/system-setting/backend/src/main/java/io/metersphere/SettingApplication.java index b8771ecb56..0636fb4b1d 100644 --- a/system-setting/backend/src/main/java/io/metersphere/SettingApplication.java +++ b/system-setting/backend/src/main/java/io/metersphere/SettingApplication.java @@ -3,6 +3,7 @@ package io.metersphere; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -11,6 +12,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/test-track/backend/src/main/java/io/metersphere/TrackApplication.java b/test-track/backend/src/main/java/io/metersphere/TrackApplication.java index 8f3db2d13f..db8068ad98 100644 --- a/test-track/backend/src/main/java/io/metersphere/TrackApplication.java +++ b/test-track/backend/src/main/java/io/metersphere/TrackApplication.java @@ -5,6 +5,7 @@ import io.metersphere.config.KafkaProperties; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -13,6 +14,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class diff --git a/workstation/backend/src/main/java/io/metersphere/WorkstationApplication.java b/workstation/backend/src/main/java/io/metersphere/WorkstationApplication.java index 3d41407974..7018f4858b 100644 --- a/workstation/backend/src/main/java/io/metersphere/WorkstationApplication.java +++ b/workstation/backend/src/main/java/io/metersphere/WorkstationApplication.java @@ -5,6 +5,7 @@ import io.metersphere.config.KafkaProperties; import io.metersphere.config.MinioProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; @@ -13,6 +14,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { + DataSourceAutoConfiguration.class, QuartzAutoConfiguration.class, LdapAutoConfiguration.class, Neo4jAutoConfiguration.class