Commit 8e13e551 authored by hezhuozhi's avatar hezhuozhi

提交定时任务

parent f32654fb
...@@ -12,7 +12,6 @@ import java.util.concurrent.ThreadPoolExecutor; ...@@ -12,7 +12,6 @@ import java.util.concurrent.ThreadPoolExecutor;
public class AsyncConfig { public class AsyncConfig {
@Bean("async") @Bean("async")
@Primary
public Executor asyncScheduledTask(){ public Executor asyncScheduledTask(){
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setMaxPoolSize(50); executor.setMaxPoolSize(50);
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.config; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.config;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
...@@ -21,6 +22,7 @@ public class JxiopExecutorConfig { ...@@ -21,6 +22,7 @@ public class JxiopExecutorConfig {
@Bean(name = "jxiopAsyncExecutor") @Bean(name = "jxiopAsyncExecutor")
@Primary
public Executor asyncServiceExecutor() { public Executor asyncServiceExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
//配置核心线程数 //配置核心线程数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment