Parameter 0 of constructor in required a bean of type ‘java.lang.String’ that could not be found

Since you do not provide the public default constructor and you added your own non-default constructor the instantiation will fail. I would suggest you to define the input file path as property like @Value(“${inputFilePath}”). If you need further initialization in your bean define a void method and annotate it with @PostConstruct and do the initialization … Read more

How to get access to job parameters from ItemReader, in Spring Batch?

As was stated, your reader needs to be ‘step’ scoped. You can accomplish this via the @Scope(“step”) annotation. It should work for you if you add that annotation to your reader, like the following: import org.springframework.batch.item.ItemReader; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component(“foo-reader”) @Scope(“step”) public final class MyReader implements ItemReader<MyData> { @Override public MyData read() throws Exception … Read more

How can we share data between the different steps of a Job in Spring Batch?

the job repository is used indirectly for passing data between steps (Jean-Philippe is right that the best way to do that is to put data into the StepExecutionContext and then use the verbosely named ExecutionContextPromotionListener to promote the step execution context keys to the JobExecutionContext. It’s helpful to note that there is a listener for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)