@Override public Batch getBatch(BatchKey key) { if ( currentBatch != null ) { if ( currentBatch.getKey().equals( key ) ) { return currentBatch; } else { currentBatch.execute(); currentBatch.release(); } } currentBatch = batchBuilder().buildBatch( key, this ); return currentBatch...
String code = jobExecution.getExecutionContext().getString("code"); if ("200".equals(code)) { return new FlowExecutionStatus("OK"); } else if ("404".equals(code)) { return new FlowExecutionStatus("NotFound"); } return new FlowExecutionStatus("ERROR"); } } 1. 2. 3. 4. 5. 6...
.from(firstStep()).on("*").to(successStep())另外一个分支,表示当firstStep()返回 * 时执行。 上面逻辑有点像 if / else 语法 if("FAILED".equals(firstStep())){ failStep(); }else{ successStep(); } 1. 2. 3. 4. 5. 几个注意点: 1> on 方法表示条件, 上一个步骤返回值,匹配指定的...
public class SkipCheckingListener extends StepExecutionListenerSupport { public ExitStatus afterStep(StepExecution stepExecution) { String exitCode = stepExecution.getExitStatus().getExitCode(); if (!exitCode.equals(ExitStatus.FAILED.getExitCode()) && stepExecution.getSkipCount() > 0) { //当Skip...
();finalStatementHandler handler = configuration.newStatementHandler(this, ms, parameterObject, RowBounds.DEFAULT,null,null);finalBoundSql boundSql =handler.getBoundSql();finalString sql =boundSql.getSql();finalStatement stmt;if(sql.equals(currentSql) &&ms.equals(currentStatement)) {intlast = ...
(BlogInfo item) throws ValidationException {/*** 需要执行super.process(item)才会调用自定义校验器*/super.process(item);/*** 对数据进行简单的处理*/if (item.getBlogItem().equals("springboot")) {item.setBlogTitle("springboot 系列还请看看我Jc");} else {item.setBlogTitle("未知系列");}...
for(String a : items) { if(a.equals("good job")) { thrownewException("custom exception"); } } System.out.println("handle end.. ---"+ items); } 其中reader中读取的文件中的数据如下: hello world hello coder good job cool 66666
();final String sql = boundSql.getSql();final Statement stmt;// 当前sql , 并且是当前statementif (sql.equals(currentSql) && ms.equals(currentStatement)) {int last = statementList.size() - 1;stmt = statementList.get(last);applyTransactionTimeout(stmt);handler.parameterize(stmt);//fix ...
read(); if (customer!=null && customer.getFirstName().equals("WrongName")) { throw new RuntimeException("Something wrong. Customer id: " + customer.getId()); } return customer; } @Override public void open(ExecutionContext executionContext) throws ItemStreamException { this.executionContext ...
public static final String InvalidApplicationPackageReferences One or more application package references could not be satisfied. This occurs if the application ID or version does not exist or is not active, or if the reference did not specify a version and there is no default version configured....