Skip to content

Commit

Permalink
Changing the use of depreacted method
Browse files Browse the repository at this point in the history
  • Loading branch information
mklinkj authored and Buzzardo committed Oct 9, 2023
1 parent d1c574d commit b2a7aa5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public void run(String... strings) throws Exception {

log.info("Querying for customer records where first_name = 'Josh':");
jdbcTemplate.query(
"SELECT id, first_name, last_name FROM customers WHERE first_name = ?", new Object[] { "Josh" },
(rs, rowNum) -> new Customer(rs.getLong("id"), rs.getString("first_name"), rs.getString("last_name"))
).forEach(customer -> log.info(customer.toString()));
"SELECT id, first_name, last_name FROM customers WHERE first_name = ?",
(rs, rowNum) -> new Customer(rs.getLong("id"), rs.getString("first_name"), rs.getString("last_name")), "Josh")
.forEach(customer -> log.info(customer.toString()));
}
}

0 comments on commit b2a7aa5

Please sign in to comment.