我在写作课上有一个方法 @BeforeStep
注解以从 ExecutionContext
具体如下:
@BeforeStep
public void beforeStep(StepExecution stepExecution) {
JobExecution jobExecution = stepExecution.getJobExecution();
ExecutionContext jobContext = jobExecution.getExecutionContext();
this.totalPolicyCount = (int) jobContext.get("TotalEmployeeCount");
}
几个月前,它还可以正常工作,但现在抛出了以下例外:
java.lang.illegalargumentexception:无法对对象[com..yyy.writer]调用方法[public void com..yyy.writer.outputwriter.beforstep(org.springframework.batch.core.stepexecution)]。outputwriter@3cbcd8f3]参数:stepexecution:id=4,version=1,name=step4,status=started,exitstatus=executing,readcount=0,filtercount=0,writecount=0 readskipcount=0,writeskipcount=0,processskipcount=0,commitcount=0,rollbackcount=0,exitdescription=位于org.springframework.batch.support.simplemethodinvoker.invokemethod(simplemethodinvoker)。java:110)
有人能告诉我这里出了什么问题吗?
暂无答案!
目前还没有任何答案,快来回答吧!