ci: 配置 virtual thread
This commit is contained in:
parent
f6eeb1150e
commit
65e9c45897
|
@ -52,7 +52,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
|
# virtual thread
|
||||||
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -51,8 +51,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -47,8 +47,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -44,8 +44,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -47,8 +47,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -1,21 +1,10 @@
|
||||||
package io.metersphere.system.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.task.AsyncTaskExecutor;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
||||||
|
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
|
||||||
|
|
||||||
@EnableAsync(proxyTargetClass = true)
|
@EnableAsync(proxyTargetClass = true)
|
||||||
|
@Configuration
|
||||||
public class AsyncConfig {
|
public class AsyncConfig {
|
||||||
|
|
||||||
@Bean
|
|
||||||
public AsyncTaskExecutor asyncTaskExecutor() {
|
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
||||||
executor.setThreadNamePrefix("Async-Executor-");
|
|
||||||
executor.setCorePoolSize(5);
|
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
|
||||||
return executor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
|
@ -44,8 +44,8 @@ mybatis.configuration.use-column-label=true
|
||||||
mybatis.configuration.auto-mapping-behavior=full
|
mybatis.configuration.auto-mapping-behavior=full
|
||||||
mybatis.configuration.default-statement-timeout=25000
|
mybatis.configuration.default-statement-timeout=25000
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
# view
|
# virtual thread
|
||||||
spring.mvc.throw-exception-if-no-handler-found=true
|
spring.threads.virtual.enabled=true
|
||||||
# flyway enable
|
# flyway enable
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
Loading…
Reference in New Issue