@Test void testSetItemToParameterConverter() { this.writer.setAssertUpdates(false); this.writer.setStatementId("updateEmployee"); this.writer.setItemToParameterConverter(item -> { Map<String, Object> parameter = new HashMap<>(); parameter.put("item", item); parameter.put("now", LocalDateTime.now(Clock.fixed(Instant.ofEpochMilli(0), ZoneId.systemDefault()))); return parameter; }); Employee employee = new Employee(); List<Employee> employees = Collections.singletonList(employee); writer.write(employees); Map<String, Object> parameter = new HashMap<>(); parameter.put("item", employee); parameter.put("now", LocalDateTime.now(Clock.fixed(Instant.ofEpochMilli(0), ZoneId.systemDefault()))); Mockito.verify(this.mockSqlSessionTemplate).update("updateEmployee", parameter); }
public void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter) { this.itemToParameterConverter = itemToParameterConverter; }
MyBatisBatchItemWriter implements ItemWriter<T>, InitializingBean { public void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter) { this.itemToParameterConverter = itemToParameterConverter; } }
MyBatisBatchItemWriter implements ItemWriter<T>, InitializingBean { public void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter) { this.itemToParameterConverter = itemToParameterConverter; }  }
MyBatisBatchItemWriter implements ItemWriter<T>, InitializingBean { public void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter) { this.itemToParameterConverter = itemToParameterConverter; }  void setAssertUpdates(boolean assertUpdates); void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory); void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate); void setStatementId(String statementId); void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter); @Override void afterPropertiesSet(); @Override void write(final List<? extends T> items); }
MyBatisBatchItemWriter implements ItemWriter<T>, InitializingBean { public void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter) { this.itemToParameterConverter = itemToParameterConverter; }  void setAssertUpdates(boolean assertUpdates); void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory); void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate); void setStatementId(String statementId); void setItemToParameterConverter(Converter<T, ?> itemToParameterConverter); @Override void afterPropertiesSet(); @Override void write(final List<? extends T> items);  }