dev_caojiahao/buyer-api/src/main/java/cn/lili/BuyerApiApplication.java

36 lines
1.0 KiB
Java
Raw Normal View History

2021-05-13 10:41:46 +08:00
package cn.lili;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
/**
* 买家API
*
* @author Chopper
2021-07-21 17:46:46 +08:00
* @since 2020/11/16 10:03 下午
2021-05-13 10:41:46 +08:00
*/
@SpringBootApplication
@EnableCaching
@EnableAsync
public class BuyerApiApplication {
@Primary
@Bean
public TaskExecutor primaryTaskExecutor() {
return new ThreadPoolTaskExecutor();
}
public static void main(String[] args) {
System.setProperty("es.set.netty.runtime.available.processors", "false");
2022-02-21 12:03:07 +08:00
System.setProperty("rocketmq.client.logUseSlf4j","true");
2021-05-13 10:41:46 +08:00
SpringApplication.run(BuyerApiApplication.class, args);
}
}