Skip to content

Instantly share code, notes, and snippets.

@SDiamante13
Last active March 12, 2020 14:19
Show Gist options
  • Select an option

  • Save SDiamante13/182b63840b8aa4f47e77fb0da52f06ee to your computer and use it in GitHub Desktop.

Select an option

Save SDiamante13/182b63840b8aa4f47e77fb0da52f06ee to your computer and use it in GitHub Desktop.
A Service that illustrates no dependency injection
public class CustomerService {
public Customer getCustomerById(long id) {
CustomerRepository customerRepository = new CustomerRepository();
return customerRepository.findById(id);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment