ÎļþÃû´Ó src/main/java/com/ard/async/AsyncConfiguration.java ÐÞ¸Ä |
| | |
| | | package com.ard.async; |
| | | package com.ard.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | @EnableAsync(proxyTargetClass = true) |
| | | public class AsyncConfiguration { |
| | | @Bean("alarm") |
| | | public ThreadPoolTaskExecutor executor(){ |
| | | public ThreadPoolTaskExecutor alarmExecutor(){ |
| | | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
| | | //é
ç½®æ ¸å¿çº¿ç¨æ° |
| | | executor.setCorePoolSize(15); |