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

@@ -17,7 +17,6 @@
package configuration;
import java.util.Arrays;
import java.util.List;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
@@ -27,6 +26,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;
@@ -79,7 +79,7 @@ public class JobConfiguration {
}
}).writer(new ItemWriter<String>() {
@Override
public void write(List<? extends String> items) throws Exception {
public void write(Chunk<? extends String> items) throws Exception {
for (Object item : items) {
System.out.println(">> " + item);
}