I am extending CrudRepository in my Repository class. I want to print the records in my table using the findAll method. So far, I have written a test class, and I can see the result query is correct. How can I print the individual records in the table?
Here is a snippet of my code: Repository Class
public interface RepositoryAda extends CrudRepository{
}
Service Class
@Service
public class Service{
@Autowired private RepositoryAda repository;
@Transactional
public List selectRecords(){
return (List) repository.findAll();
}
}
Test Case:
@Test
public void getAllRecords() {
service.selectRecords();
}
How can I print the individual records from the table to a console?