@Test @Sql(scripts = { "/sql/clearBank.sql" }) public void testCreate() { BankEntity bankEntity = getBankEntity(); BankEntity actualResult = bankJdbcRepository.create(bankEntity); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_bank", new BankResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("name")).isEqualTo(actualResult.getName()); assertThat(row.get("code")).isEqualTo(actualResult.getCode()); }
public BankEntity create(BankEntity entity) { super.create(entity); return entity; }
BankJdbcRepository extends JdbcRepository { public BankEntity create(BankEntity entity) { super.create(entity); return entity; } }
BankJdbcRepository extends JdbcRepository { public BankEntity create(BankEntity entity) { super.create(entity); return entity; } BankJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
BankJdbcRepository extends JdbcRepository { public BankEntity create(BankEntity entity) { super.create(entity); return entity; } BankJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); BankEntity create(BankEntity entity); BankEntity update(BankEntity entity); Pagination<Bank> search(BankSearch domain); BankEntity findById(BankEntity entity); }
BankJdbcRepository extends JdbcRepository { public BankEntity create(BankEntity entity) { super.create(entity); return entity; } BankJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); BankEntity create(BankEntity entity); BankEntity update(BankEntity entity); Pagination<Bank> search(BankSearch domain); BankEntity findById(BankEntity entity);  }