All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.greennlab.ddul.DDulAsyncConfiguration Maven / Gradle / Ivy

Go to download

DDul means "ground" in korean prounance. It helps to you when concreate a java projects. And support with database access, cache abstraction, system code generation, hierarchical data handling, article management and etc.

There is a newer version: 0.3.0
Show newest version
package io.github.greennlab.ddul;

import java.util.concurrent.Executor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

@Configuration
@EnableAsync
public class DDulAsyncConfiguration {

  @Bean
  public Executor asyncThreadExecutor() {
    final ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(5);
    executor.setMaxPoolSize(20);
    executor.setThreadNamePrefix("async-task-executor");
    executor.initialize();

    return executor;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy