Skip to content

Commit

Permalink
Clean up application run source
Browse files Browse the repository at this point in the history
Remove the comment section and also the for loop and replacing it likewise with the findByLastname fetching method
  • Loading branch information
GeorgePanaretos authored and Buzzardo committed Oct 16, 2023
1 parent bd37d19 commit 98807ac
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public CommandLineRunner demo(CustomerRepository repository) {
// fetch all customers
log.info("Customers found with findAll():");
log.info("-------------------------------");
for (Customer customer : repository.findAll()) {
repository.findAll().forEach(customer -> {
log.info(customer.toString());
}
});
log.info("");

// fetch an individual customer by ID
Expand All @@ -47,9 +47,6 @@ public CommandLineRunner demo(CustomerRepository repository) {
repository.findByLastName("Bauer").forEach(bauer -> {
log.info(bauer.toString());
});
// for (Customer bauer : repository.findByLastName("Bauer")) {
// log.info(bauer.toString());
// }
log.info("");
};
}
Expand Down

0 comments on commit 98807ac

Please sign in to comment.