spring batch multiple inputfiles in environment variables

I need serious help please
i’m stuck for 3 days now in same problem
i have to code a spring batch program that read multiple csv files and copy their content into an output file.
My batch configuration is syntactically correct and i run the app without errors but i don’t see items displayed in console!! feel like the files where not even red!
I have two writers:
One to write in console and the other to write in dest file
But none of them woked!!
I don’t think that files are even red !
here is my batchConfig class:

@Component

@Configuration

@EnableBatchProcessing

public class batchConfig {

 

                   @Autowired

                    private JobBuilderFactory jobBuilderFactory;

                    

                    @Autowired

                    private StepBuilderFactory stepBuilderFactory;

               

                //    @Value(value="Fichiers-eclates/fichier-eclate-*.csv")

                //    private Resource() inputResources;

                  //  @Value("#{jobParameters('FichierEclate')}") Resource() inputFile;

                   @Value("file:/Fichiers-eclates/*.csv") Resource() inputFile;

 

                //   @Value("#{jobParameters('FichierRegrouppe')}") Resource  outputFile;

                   

                    

                    @Bean

                    public ConsoleItemWriter<FichierEclate> writerConsole()

                    {

                        return new ConsoleItemWriter<FichierEclate>();

                    }

                 

                   

                    public FlatFileItemWriter<FichierEclate> writer() 

                    {

                      

                        FlatFileItemWriter<FichierEclate> writer = new FlatFileItemWriter<>();

                        

                      

                       writer.setResource(new ClassPathResource("Fichiers-regrouppes/outputData.csv"));

                         

                     

                        writer.setAppendAllowed(true);

                  

                       

                        writer.setLineAggregator(new DelimitedLineAggregator<FichierEclate>() {

                            {

                                setDelimiter(",");

                                setFieldExtractor(new BeanWrapperFieldExtractor<FichierEclate>() {

                                    {

                                        setNames(new String() { "AffaireID","CodeClasse","CodeAppli","NBcompte","NBlot" });

                                    }

                                });

                            }

                        });

                        return writer;

                    }

               

                    @Bean

                    public Job readCSVFilesJob() {

                        return jobBuilderFactory

                                .get("readCSVFilesJob")

                                .incrementer(new RunIdIncrementer())

                                .start(step1())

                                .build();

                    }

               

                    @Bean

                    public Step step1()  {

                        return stepBuilderFactory.get("step1").<FichierEclate, FichierEclate>chunk(100)

                                .reader(multiResourceItemReader())

                                .writer(writerConsole())

                                .build();

                    }

                    @Primary

                    @Bean

                    public MultiResourceItemReader<FichierEclate> multiResourceItemReader()

                    {

                        MultiResourceItemReader<FichierEclate> resourceItemReader = new MultiResourceItemReader<FichierEclate>();

                        resourceItemReader.setResources(inputFile);

                        resourceItemReader.setDelegate(reader());

                        return resourceItemReader;

                    }

                   

                   @SuppressWarnings({ "rawtypes", "unchecked" })

                    @Bean

                    public FlatFileItemReader<FichierEclate> reader()

                    {

                      

                        FlatFileItemReader<FichierEclate> reader = new FlatFileItemReader<FichierEclate>();

                       

                      
                        reader.setLinesToSkip(1);  

                         

                       

                        reader.setLineMapper(new DefaultLineMapper() {

                            {

                              

                                setLineTokenizer(new DelimitedLineTokenizer() {

                                    {

                                        setNames(new String() { "AffaireID","CodeClasse","CodeAppli","NBcompte","NBlot" });

                                    }

                                });

                               

                                setFieldSetMapper(new BeanWrapperFieldSetMapper<FichierEclate>() {

                                    {

                                       setTargetType(FichierEclate.class);

                                    }

                                });

                            }

                        });

                        return reader;

                    }

 @Bean
 public JobParametersValidator defaultJobParametersValidator() {
 DefaultJobParametersValidator bean = new DefaultJobParametersValidator();

                                               bean.setRequiredKeys(new String() { "FichierEclate" });

                                               bean.setOptionalKeys(new String() { "run.id" });

                                               return bean;

                               }

 

                               @Bean

                               public JobParametersValidator myJobParametersValidator() {

                                               return new MyJobParametersValidator();

                               }

}

here another class for consoleWriter :

import java.util.List;

 

import org.springframework.batch.item.ItemWriter;

 

public class ConsoleItemWriter<T> implements ItemWriter<T> {

    @Override

    public void write(List<? extends T> items) throws Exception {

        for (T item : items) {

            System.out.println(item);

        }

    }

}

Now my questions are:

1/ the folder that contains multiple files to be red is outside so i
want to pass the folder path as environment variable in “Run
configurations” in Eclipse. I’ll need this in production later. Then i
call that environment variable in the flatefileItemReader or the
MultiresourceReader, not sure, i need you to tell me which one and how
please?

2/ the outputfile that will contain the content of all input files
should be created automatically in specific folder. this folder path
should be also passed as environment variable and called later in
FlatFileitemWriter.

3/ Why i don’t see items displayed in console althought i don’t have
errors? if because the files where not red, tell me how to acheive
question “1”.

How can i solve this please ?!!