Sfoglia il codice sorgente

overloaded person constructor

mpierse 5 anni fa
parent
commit
0886b84c45

+ 5
- 0
src/main/java/io/zipcoder/crudapp/Person.java Vedi File

@@ -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 Vedi File

@@ -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
 }