是否有任何方式在read(),updated()和open()方法之外的任何其他方式在executioncontext中添加條目。如何編輯ExecutionContext彈簧批處理
像在下面的代碼中,我試圖在close方法中添加條目。
在上述示例中,我無法更新新條目。 它只能以只讀的方式工作。我可以讀取數據但不寫入。
class abc{
@Autowired
private ExecutionContext executionContext;
public AccountDetails mapFieldSet(FieldSet fieldSet) throws BindException {
executionContext.putLong(Constants.CONTEXT_COUNT_KEY.getStrValue(), 47);
return accDetailsObj;
}
}
我還需要在其他類中更新executionContext。 有什麼辦法嗎?
你能分享你的閱讀器的配置嗎? –