package com.lxzn;
|
|
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
import com.lxzn.backpass.FileMonitor;
|
import org.mybatis.spring.annotation.MapperScan;
|
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.Primary;
|
import org.springframework.core.task.TaskExecutor;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
@SpringBootApplication(exclude = {org.activiti.spring.boot.SecurityAutoConfiguration.class, DruidDataSourceAutoConfigure.class})
|
@MapperScan(basePackages={"com.lxzn.ucenter.dao", "com.lxzn.base.dao", "com.lxzn.nc.dao", "com.lxzn.activiti.dao", "com.lxzn.lgnc.dao"})
|
@EnableScheduling
|
public class LxznAdminApplication {
|
public static void main(String[] args) throws Exception {
|
SpringApplication.run(LxznAdminApplication.class, args);
|
}
|
|
@Primary
|
@Bean
|
public TaskExecutor primaryTaskExecutor() {
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
// add necessary properties to the executor
|
executor.setCorePoolSize(10);
|
executor.setMaxPoolSize(80);
|
executor.setQueueCapacity(100);
|
executor.initialize();
|
return executor;
|
|
}
|
|
@Bean
|
public FileMonitor fileMonitor() {
|
return new FileMonitor();
|
}
|
}
|