Hello,
i hope to have a answer
I have another problem. in command line i define some parameter.
I try to retrieve this parameter in my bean JobParameterIncrementer in order to init my job incrementer.Code:org.springframework.batch.core.launch.support.CommandLineJobRunner -next start.date=20120101
like this
Code:public class JobParametersIncrementer extends AbstractLoopJobParametersIncrementer { @Value("#{jobParameters['start.date']}") private String startDate; private Calendar date; @PostConstruct void init(){ date = new SimpleDateFormat("yyyyMMdd").parse(startDate); } ... }
but i have this error.
How to retrieve the initial job parameter in incremeter?Code:org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'jobParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'



Reply With Quote