本文整理汇总了Java中org.springframework.batch.core.ItemReadListener类的典型用法代码示例。如果您正苦于以下问题:Java ItemReadListener类的具体用法?Java ItemReadListener怎么用?Java ItemReadListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemReadListener类属于org.springframework.batch.core包,在下文中一共展示了ItemReadListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setupMock
import org.springframework.batch.core.ItemReadListener; //导入依赖的package包/类
@Before
public void setupMock() {
when(taskletStep.getTasklet()).thenReturn(
new ChunkOrientedTasklet(chunkProvider, chunkProcessor));
when(taskletStep.getName()).thenReturn("FOOOBAR");
registerAlias(ItemProcessListener.class, BatchEventAutoConfiguration.ITEM_PROCESS_EVENTS_LISTENER);
registerAlias(StepExecutionListener.class, BatchEventAutoConfiguration.STEP_EXECUTION_EVENTS_LISTENER);
registerAlias(ChunkListener.class, BatchEventAutoConfiguration.CHUNK_EVENTS_LISTENER);
registerAlias(ItemReadListener.class, BatchEventAutoConfiguration.ITEM_READ_EVENTS_LISTENER);
registerAlias(ItemWriteListener.class, BatchEventAutoConfiguration.ITEM_WRITE_EVENTS_LISTENER);
registerAlias(SkipListener.class, BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER);
}
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:14,代码来源:TaskBatchEventListenerBeanPostProcessorTests.java
示例2: readWriteJob
import org.springframework.batch.core.ItemReadListener; //导入依赖的package包/类
@Bean
public Job readWriteJob() {
Step step = stepBuilders.get("readWriteStep")
.<String, String>chunk(10)
.reader(reader())
.writer(writer())
.listener((ItemReadListener) stopListener())
.build();
return jobBuilders.get("readWriterJob").start(step).build();
}
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:11,代码来源:StopConfiguration.java
示例3: itemReadEventsListener
import org.springframework.batch.core.ItemReadListener; //导入依赖的package包/类
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.item-read", name = "enabled", havingValue = "true", matchIfMissing = true)
public ItemReadListener itemReadEventsListener() {
return new EventEmittingItemReadListener(listenerChannels.itemReadEvents(),taskEventProperties.getItemReadOrder());
}
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:6,代码来源:BatchEventAutoConfiguration.java
示例4: registerItemReadEvents
import org.springframework.batch.core.ItemReadListener; //导入依赖的package包/类
private void registerItemReadEvents(SimpleChunkProvider chunkProvider) {
if(this.applicationContext.containsBean(BatchEventAutoConfiguration.ITEM_READ_EVENTS_LISTENER)) {
chunkProvider.registerListener((ItemReadListener) this.applicationContext.getBean(BatchEventAutoConfiguration.ITEM_READ_EVENTS_LISTENER));
}
}
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:6,代码来源:TaskBatchEventListenerBeanPostProcessor.java
注:本文中的org.springframework.batch.core.ItemReadListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论