添加用户个人技能标签提取

This commit is contained in:
zk
2026-03-20 11:34:12 +08:00
parent dc2e241151
commit 971694d648
7 changed files with 466 additions and 6 deletions
@@ -0,0 +1,30 @@
package org.jiayunet.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 异步任务配置
* 用于用户技能标签匹配等异步任务
*/
@Configuration
@EnableAsync
public class AsyncConfig {
@Bean(name = "userProfileAsyncExecutor")
public Executor userProfileAsyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(200);
executor.setThreadNamePrefix("user-profile-async-");
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
executor.initialize();
return executor;
}
}