Updated Observation code to use the updates offered by the Micrometer snapshot

This commit is contained in:
Glenn Renfro
2022-08-30 14:28:54 -04:00
parent e4581420b0
commit 3609e53751
13 changed files with 84 additions and 90 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.batch.core.configuration.annotation.JobBuilderFactory
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.item.Chunk;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader;
@@ -80,7 +81,7 @@ public class BatchEventsApplication {
}
}).writer(new ItemWriter<String>() {
@Override
public void write(List<? extends String> items) throws Exception {
public void write(Chunk<? extends String> items) throws Exception {
for (String item : items) {
System.out.println(">> " + item);
}