Bladeren bron

overloaded person constructor

mpierse 5 jaren geleden
bovenliggende
commit
0886b84c45

+ 5
- 0
src/main/java/io/zipcoder/crudapp/Person.java Bestand weergeven

@@ -20,6 +20,11 @@ public class Person {
20 20
     public Person() {
21 21
     }
22 22
 
23
+    public Person(String firstName, String lastName) {
24
+        this.firstName = firstName;
25
+        this.lastName = lastName;
26
+    }
27
+
23 28
     public Long getId() {
24 29
         return id;
25 30
     }

+ 0
- 2
src/main/java/io/zipcoder/crudapp/PersonRepository.java Bestand weergeven

@@ -4,6 +4,4 @@ import org.springframework.data.repository.CrudRepository;
4 4
 
5 5
 public interface PersonRepository extends CrudRepository<Person, Long> {
6 6
 
7
-
8
-
9 7
 }