Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class Person implements Serializable
private static final long serialVersionUID = 1L;
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Integer id;
private String email;
private String password;
private String firstname;
private String lastname;
private Date dob;
//setters and getters
public interface PersonRepository extends JpaRepository<Person, Integer>{
public class ContactController {
private PersonRepository personRepository;
public List<Person> persons() {
return personRepository.findAll();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.