管理员 10 months ago
parent 1b89eda79c
commit fe7085da07

@ -275,7 +275,7 @@ xss:
# 全局线程池相关配置 # 全局线程池相关配置
thread-pool: thread-pool:
# 是否开启线程池 # 是否开启线程池
enabled: false enabled: true
# 队列最大长度 # 队列最大长度
queueCapacity: 128 queueCapacity: 128
# 线程池维护线程所允许的空闲时间 # 线程池维护线程所允许的空闲时间

@ -12,6 +12,8 @@ import com.ruoyi.common.annotation.Info;
import lombok.Data; import lombok.Data;
import org.apache.velocity.VelocityContext; import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.app.VelocityEngine;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
@ -37,6 +39,8 @@ public class MongoGenerator {
private String moduleName = "jobs"; private String moduleName = "jobs";
@Test @Test
@Disabled
@DisplayName("mongodb代码生成")
public void generate() throws Exception { public void generate() throws Exception {
List<BaseInfo> entityList = scan(); //所有编写了@Info的实体类 List<BaseInfo> entityList = scan(); //所有编写了@Info的实体类

@ -9,6 +9,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
@ -68,7 +69,7 @@ public class ThreadPoolConfig {
} }
@Bean @Bean
@ConditionalOnMissingBean(ThreadPoolTaskScheduler.class) @Primary
public ThreadPoolTaskScheduler threadPoolTaskScheduler() { public ThreadPoolTaskScheduler threadPoolTaskScheduler() {
ThreadPoolTaskScheduler t = new ThreadPoolTaskScheduler(); ThreadPoolTaskScheduler t = new ThreadPoolTaskScheduler();

Loading…
Cancel
Save