0
我收到以下错误错误创建豆春季
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preTransactionHandlerPool' defined in class com.fg.transbridge.processor.spring.ContextConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException
我有preTransactionHandlerPool
豆alredy。
@Bean(name = "preTransactionHandlerPool")
public ThreadPoolTaskExecutor preTransactionHandlerPool() {
LOGGER.info("Initializing preTransactionHandlerPool");
ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
threadPoolTaskExecutor.setCorePoolSize(preTransCorePoolSize);
threadPoolTaskExecutor.setMaxPoolSize(preTransMaxPoolSize);
threadPoolTaskExecutor.setWaitForTasksToCompleteOnShutdown(preWaitForCompleteShutDown);
LOGGER.debug("Initiated preTransactionHandlerPool");
return threadPoolTaskExecutor;
}
可能是什么原因? 非常感谢您的帮助。
谢谢
'IllegalArgumentException',很可能你喂它错误的数据。你能否在创建bean的时候发布更多的代码? – bas
@bas编辑它为你说的 – Ravindu
你确定''preTransactionHandlerPool“'是一个正确的值吗?这看起来好像是这种方法的非法论据。 – bas