我一直在尝试进行设置,在其中创建实现 JdbcCursorItemReader 的 PostDatedAchInReader,然后将其注入 PostDatedAchInAggregatingJdbcItemReader,后者根据特定条件收集读取对象并将它们分组到一个列表中,基本上按客户端 ID 保留所有 ach 请求组。但是,我不断收到没有合格的 bean 错误,但 bean 在这里并已定义。我很困惑问题是什么或如何解决它。
所以我有以下配置文件
@Configuration
public class PostDatedAchInBatchConfig extends AbstractCommonBatchJobConfig {
private static final String ACH_FULFILLMENT_POST_DATED_ACH_IN_STEP1_NAME =
"achFulfillment_postDatedAchInJob_step1_scheduleAchIns";
@Autowired
DataSource prodDataSource;
/**
* This method defines the Job.
*
* @return postdatedachinjob
* return the configured job.
*/
@Bean(name = "achFulfillmentPostDatedAchInJob")
public Job job() throws Exception {
mmLogMgr.info("AchFulfillmentEmailBatchConfig : job");
return getJobBuilderFactory().get("achFulfillmentPostDatedAchInJob")
.listener(postDatedAchInListener())
.start(step1())
.on(ExitStatus.COMPLETED.getExitCode())
.end() // end of TransactionBuilder
.end() // end of FlowBuilder
.build();
}
..
/**
* @return postDatedAchInAggregatingJdbcItemReader.
*/
@Bean
@Scope(value = "step", proxyMode = ScopedProxyMode.DEFAULT)
public ItemReader<ArrayList<PostDatedAchIn>> postDatedAchInAggregatingJdbcItemReader(@Qualifier("postDatedAchInReader") final PostDatedAchInReader postDatedAchInReader)
throws Exception {
PostDatedAchInAggregatingJdbcItemReader postDatedAchInAggregatingJdbcItemReader =
new PostDatedAchInAggregatingJdbcItemReader();
postDatedAchInAggregatingJdbcItemReader.setDatabaseItemReader(postDatedAchInReader);
return postDatedAchInAggregatingJdbcItemReader;
}
我很困惑它如何说它在类中定义时找不到该类型的 bean。
我怎样才能解决这个问题?
慕虎7371278
相关分类