Exemplo n.º 1
0
 @Override
 public Customer findCustomerById(long customerId) {
   Customer customer = customerRepository.findOne(customerId);
   if (null == customer) throw new CustomerNotFoundException(customerId);
   Hibernate.initialize(customer.getUser());
   return customer;
 }